Browse Source

support of recursive clone/pull

pull/14/head
Dr.Lt.Data 1 year ago
parent
commit
9a087da93d
  1. 15
      __init__.py
  2. 24
      custom-node-list.json
  3. 76
      extension-node-map.json
  4. 12
      git_helper.py

15
__init__.py

@ -16,7 +16,7 @@ sys.path.append('../..')
from torchvision.datasets.utils import download_url from torchvision.datasets.utils import download_url
# ensure .js # ensure .js
print("### Loading: ComfyUI-Manager (V0.6.3)") print("### Loading: ComfyUI-Manager (V0.6.4)")
comfy_path = os.path.dirname(folder_paths.__file__) comfy_path = os.path.dirname(folder_paths.__file__)
custom_nodes_path = os.path.join(comfy_path, 'custom_nodes') 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 # Compare the commit hashes to determine if the local repository is behind the remote repository
if commit_hash != remote_commit_hash: 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 return False
@ -107,7 +113,8 @@ def git_pull(path):
repo = git.Repo(path) repo = git.Repo(path)
origin = repo.remote(name='origin') origin = repo.remote(name='origin')
origin.pull() origin.pull()
repo.git.submodule('update', '--init', '--recursive')
repo.close() repo.close()
return True return True
@ -454,7 +461,7 @@ def gitclone_install(files):
process = subprocess.Popen([sys.executable, git_script_path, "--clone", custom_nodes_path, url]) process = subprocess.Popen([sys.executable, git_script_path, "--clone", custom_nodes_path, url])
process.wait() process.wait()
else: else:
repo = git.Repo.clone_from(url, repo_path) repo = git.Repo.clone_from(url, repo_path, recursive=True)
repo.git.clear_cache() repo.git.clear_cache()
repo.close() repo.close()

24
custom-node-list.json

@ -138,6 +138,10 @@
"https://github.com/paulo-coronado/comfy_clip_blip_node" "https://github.com/paulo-coronado/comfy_clip_blip_node"
], ],
"install_type": "git-clone", "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." "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", "install_type": "git-clone",
"description": "ComfyUI nodes for the Ultimate Stable Diffusion Upscale script by Coyote-A." "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", "author": "pythongosssss",
"title": "ComfyUI-Custom-Scripts", "title": "ComfyUI-Custom-Scripts",

76
extension-node-map.json

@ -346,6 +346,62 @@
"KSampler (Efficient)", "KSampler (Efficient)",
"XY Plot" "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": [ "https://github.com/SLAPaper/ComfyUI-Image-Selector": [
"ImageDuplicator", "ImageDuplicator",
"ImageSelector", "ImageSelector",
@ -396,6 +452,7 @@
"Diffusers Hub Model Down-Loader", "Diffusers Hub Model Down-Loader",
"Diffusers Model Loader", "Diffusers Model Loader",
"Image Analyze", "Image Analyze",
"Image Batch",
"Image Blank", "Image Blank",
"Image Blend", "Image Blend",
"Image Blend by Mask", "Image Blend by Mask",
@ -408,6 +465,7 @@
"Image Crop Face", "Image Crop Face",
"Image Crop Location", "Image Crop Location",
"Image Crop Square Location", "Image Crop Square Location",
"Image Displacement Warp",
"Image Dragan Photography Filter", "Image Dragan Photography Filter",
"Image Edge Detection Filter", "Image Edge Detection Filter",
"Image Film Grain", "Image Film Grain",
@ -428,8 +486,10 @@
"Image Paste Crop", "Image Paste Crop",
"Image Paste Crop by Location", "Image Paste Crop by Location",
"Image Paste Face", "Image Paste Face",
"Image Perlin Noise Filter", "Image Perlin Noise",
"Image Perlin Power Fractal",
"Image Pixelate", "Image Pixelate",
"Image Power Noise",
"Image Remove Background (Alpha)", "Image Remove Background (Alpha)",
"Image Remove Color", "Image Remove Color",
"Image Resize", "Image Resize",
@ -449,6 +509,7 @@
"Image fDOF Filter", "Image fDOF Filter",
"Image to Latent Mask", "Image to Latent Mask",
"Image to Noise", "Image to Noise",
"Image to Seed",
"Inset Image Bounds", "Inset Image Bounds",
"KSampler (WAS)", "KSampler (WAS)",
"Latent Input Switch", "Latent Input Switch",
@ -510,6 +571,8 @@
"Text Find and Replace Input", "Text Find and Replace Input",
"Text Find and Replace by Dictionary", "Text Find and Replace by Dictionary",
"Text Input Switch", "Text Input Switch",
"Text List",
"Text List Concatenate",
"Text Multiline", "Text Multiline",
"Text Parse A1111 Embeddings", "Text Parse A1111 Embeddings",
"Text Parse Noodle Soup Prompts", "Text Parse Noodle Soup Prompts",
@ -540,6 +603,11 @@
], ],
"https://github.com/bvhari/ComfyUI_ImageProcessing": [ "https://github.com/bvhari/ComfyUI_ImageProcessing": [
"BilateralFilter", "BilateralFilter",
"Brightness",
"Gamma",
"Hue",
"Saturation",
"SigmoidCorrection",
"UnsharpMask" "UnsharpMask"
], ],
"https://github.com/bvhari/ComfyUI_LatentToRGB": [ "https://github.com/bvhari/ComfyUI_LatentToRGB": [
@ -812,6 +880,12 @@
"https://github.com/pythongosssss/ComfyUI-WD14-Tagger": [ "https://github.com/pythongosssss/ComfyUI-WD14-Tagger": [
"WD14Tagger|pysssss" "WD14Tagger|pysssss"
], ],
"https://github.com/space-nuko/ComfyUI-Disco-Diffusion": [
"DiscoDiffusion_DiscoDiffusion",
"DiscoDiffusion_DiscoDiffusionExtraSettings",
"DiscoDiffusion_GuidedDiffusionLoader",
"DiscoDiffusion_OpenAICLIPLoader"
],
"https://github.com/ssitu/ComfyUI_UltimateSDUpscale": [ "https://github.com/ssitu/ComfyUI_UltimateSDUpscale": [
"UltimateSDUpscale" "UltimateSDUpscale"
], ],

12
git_helper.py

@ -7,7 +7,7 @@ def gitclone(custom_nodes_path, url):
repo_path = os.path.join(custom_nodes_path, repo_name) repo_path = os.path.join(custom_nodes_path, repo_name)
# Clone the repository from the remote URL # 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.git.clear_cache()
repo.close() repo.close()
@ -24,7 +24,13 @@ def gitcheck(path):
# Compare the commit hashes to determine if the local repository is behind the remote repository # Compare the commit hashes to determine if the local repository is behind the remote repository
if commit_hash != remote_commit_hash: 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: else:
print("CUSTOM NODE CHECK: False") print("CUSTOM NODE CHECK: False")
@ -36,7 +42,7 @@ def gitpull(path):
# Pull the latest changes from the remote repository # Pull the latest changes from the remote repository
repo = git.Repo(path) repo = git.Repo(path)
origin = repo.remote(name='origin') origin = repo.remote(name='origin')
origin.pull() origin.pull(submodule_update='recursive')
repo.close() repo.close()

Loading…
Cancel
Save