From 9a087da93dfbc5d05ad60985876c2512bf69c477 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sun, 28 May 2023 16:39:52 +0900 Subject: [PATCH] support of recursive clone/pull --- __init__.py | 15 +++++--- custom-node-list.json | 24 +++++++++++++ extension-node-map.json | 76 ++++++++++++++++++++++++++++++++++++++++- git_helper.py | 12 +++++-- 4 files changed, 119 insertions(+), 8 deletions(-) diff --git a/__init__.py b/__init__.py index 3e09921..85f5eda 100644 --- a/__init__.py +++ b/__init__.py @@ -16,7 +16,7 @@ sys.path.append('../..') from torchvision.datasets.utils import download_url # ensure .js -print("### Loading: ComfyUI-Manager (V0.6.3)") +print("### Loading: ComfyUI-Manager (V0.6.4)") comfy_path = os.path.dirname(folder_paths.__file__) custom_nodes_path = os.path.join(comfy_path, 'custom_nodes') @@ -90,7 +90,13 @@ def git_repo_has_updates(path): # Compare the commit hashes to determine if the local repository is behind the remote repository if commit_hash != remote_commit_hash: - return True + # Get the commit dates + commit_date = repo.head.commit.committed_datetime + remote_commit_date = repo.refs[f'{remote_name}/HEAD'].object.committed_datetime + + # Compare the commit dates to determine if the local repository is behind the remote repository + if commit_date < remote_commit_date: + return True return False @@ -107,7 +113,8 @@ def git_pull(path): repo = git.Repo(path) origin = repo.remote(name='origin') origin.pull() - + repo.git.submodule('update', '--init', '--recursive') + repo.close() return True @@ -454,7 +461,7 @@ def gitclone_install(files): process = subprocess.Popen([sys.executable, git_script_path, "--clone", custom_nodes_path, url]) process.wait() else: - repo = git.Repo.clone_from(url, repo_path) + repo = git.Repo.clone_from(url, repo_path, recursive=True) repo.git.clear_cache() repo.close() diff --git a/custom-node-list.json b/custom-node-list.json index 613b386..673a727 100644 --- a/custom-node-list.json +++ b/custom-node-list.json @@ -138,6 +138,10 @@ "https://github.com/paulo-coronado/comfy_clip_blip_node" ], "install_type": "git-clone", + "apt_dependency": [ + "rustc", + "cargo" + ], "description": "CLIPTextEncodeBLIP: This custom node provides a CLIP Encoder that is capable of receiving images as input." }, { @@ -441,6 +445,26 @@ "install_type": "git-clone", "description": "ComfyUI nodes for the Ultimate Stable Diffusion Upscale script by Coyote-A." }, + { + "author": "space-nuko", + "title": "Disco Diffusion", + "reference": "https://github.com/space-nuko/ComfyUI-Disco-Diffusion", + "files": [ + "https://github.com/space-nuko/ComfyUI-Disco-Diffusion" + ], + "install_type": "git-clone", + "description": "Modularized version of Disco Diffusion for use with ComfyUI." + }, + { + "author": "Nourepide", + "title": "Allor Plugin", + "reference": "https://github.com/Nourepide/ComfyUI-Allore", + "files": [ + "https://github.com/Nourepide/ComfyUI-Allore" + ], + "install_type": "git-clone", + "description": "Allure is a plugin for ComfyUI with an emphasis on transparency and performance." + }, { "author": "pythongosssss", "title": "ComfyUI-Custom-Scripts", diff --git a/extension-node-map.json b/extension-node-map.json index 9fa2130..d0a6dd2 100644 --- a/extension-node-map.json +++ b/extension-node-map.json @@ -346,6 +346,62 @@ "KSampler (Efficient)", "XY Plot" ], + "https://github.com/Nourepide/ComfyUI-Allore": [ + "AlphaChanelByMask", + "AlphaChanelByMask", + "AlphaChanelRestore", + "AlphaChanelRestore", + "ClipClamp", + "ClipClamp", + "ClipVisionClamp", + "ClipVisionClamp", + "ClipVisionOutputClamp", + "ClipVisionOutputClamp", + "ConditioningClamp", + "ConditioningClamp", + "ControlNetClamp", + "ControlNetClamp", + "GligenClamp", + "GligenClamp", + "ImageClamp", + "ImageClamp", + "ImageCompositeAbsolute", + "ImageCompositeAbsolute", + "ImageCompositeRelative", + "ImageCompositeRelative", + "ImageContainer", + "ImageContainer", + "ImageContainerInheritanceAdd", + "ImageContainerInheritanceAdd", + "ImageContainerInheritanceMax", + "ImageContainerInheritanceMax", + "ImageContainerInheritanceScale", + "ImageContainerInheritanceScale", + "ImageContainerInheritanceSum", + "ImageContainerInheritanceSum", + "ImageSegmentation", + "ImageSegmentation", + "ImageSegmentationCustom", + "ImageSegmentationCustom", + "ImageSegmentationCustomAdvanced", + "ImageSegmentationCustomAdvanced", + "ImageText", + "ImageText", + "ImageTextOutlined", + "ImageTextOutlined", + "LatentClamp", + "LatentClamp", + "MaskClamp", + "MaskClamp", + "ModelClamp", + "ModelClamp", + "StyleModelClamp", + "StyleModelClamp", + "UpscaleModelClamp", + "UpscaleModelClamp", + "VaeClamp", + "VaeClamp" + ], "https://github.com/SLAPaper/ComfyUI-Image-Selector": [ "ImageDuplicator", "ImageSelector", @@ -396,6 +452,7 @@ "Diffusers Hub Model Down-Loader", "Diffusers Model Loader", "Image Analyze", + "Image Batch", "Image Blank", "Image Blend", "Image Blend by Mask", @@ -408,6 +465,7 @@ "Image Crop Face", "Image Crop Location", "Image Crop Square Location", + "Image Displacement Warp", "Image Dragan Photography Filter", "Image Edge Detection Filter", "Image Film Grain", @@ -428,8 +486,10 @@ "Image Paste Crop", "Image Paste Crop by Location", "Image Paste Face", - "Image Perlin Noise Filter", + "Image Perlin Noise", + "Image Perlin Power Fractal", "Image Pixelate", + "Image Power Noise", "Image Remove Background (Alpha)", "Image Remove Color", "Image Resize", @@ -449,6 +509,7 @@ "Image fDOF Filter", "Image to Latent Mask", "Image to Noise", + "Image to Seed", "Inset Image Bounds", "KSampler (WAS)", "Latent Input Switch", @@ -510,6 +571,8 @@ "Text Find and Replace Input", "Text Find and Replace by Dictionary", "Text Input Switch", + "Text List", + "Text List Concatenate", "Text Multiline", "Text Parse A1111 Embeddings", "Text Parse Noodle Soup Prompts", @@ -540,6 +603,11 @@ ], "https://github.com/bvhari/ComfyUI_ImageProcessing": [ "BilateralFilter", + "Brightness", + "Gamma", + "Hue", + "Saturation", + "SigmoidCorrection", "UnsharpMask" ], "https://github.com/bvhari/ComfyUI_LatentToRGB": [ @@ -812,6 +880,12 @@ "https://github.com/pythongosssss/ComfyUI-WD14-Tagger": [ "WD14Tagger|pysssss" ], + "https://github.com/space-nuko/ComfyUI-Disco-Diffusion": [ + "DiscoDiffusion_DiscoDiffusion", + "DiscoDiffusion_DiscoDiffusionExtraSettings", + "DiscoDiffusion_GuidedDiffusionLoader", + "DiscoDiffusion_OpenAICLIPLoader" + ], "https://github.com/ssitu/ComfyUI_UltimateSDUpscale": [ "UltimateSDUpscale" ], diff --git a/git_helper.py b/git_helper.py index d5bd794..be65fd0 100644 --- a/git_helper.py +++ b/git_helper.py @@ -7,7 +7,7 @@ def gitclone(custom_nodes_path, url): repo_path = os.path.join(custom_nodes_path, repo_name) # Clone the repository from the remote URL - repo = git.Repo.clone_from(url, repo_path) + repo = git.Repo.clone_from(url, repo_path, recursive=True) repo.git.clear_cache() repo.close() @@ -24,7 +24,13 @@ def gitcheck(path): # Compare the commit hashes to determine if the local repository is behind the remote repository if commit_hash != remote_commit_hash: - print("CUSTOM NODE CHECK: True") + # Get the commit dates + commit_date = repo.head.commit.committed_datetime + remote_commit_date = repo.refs[f'{remote_name}/HEAD'].object.committed_datetime + + # Compare the commit dates to determine if the local repository is behind the remote repository + if commit_date < remote_commit_date: + print("CUSTOM NODE CHECK: True") else: print("CUSTOM NODE CHECK: False") @@ -36,7 +42,7 @@ def gitpull(path): # Pull the latest changes from the remote repository repo = git.Repo(path) origin = repo.remote(name='origin') - origin.pull() + origin.pull(submodule_update='recursive') repo.close()