Browse Source

fix: scanner.py

update DB
pull/100/head
dr.lt.data 1 year ago
parent
commit
d3f5441899
  1. 2
      custom-node-list.json
  2. 3
      extension-node-map.json
  3. 60
      model-list.json
  4. 2
      node_db/new/custom-node-list.json
  5. 3
      node_db/new/extension-node-map.json
  6. 60
      node_db/new/model-list.json
  7. 6
      scanner.py

2
custom-node-list.json

@ -1618,7 +1618,7 @@
"https://github.com/mav-rik/facerestore_cf"
],
"install_type": "git-clone",
"description": "This is a copy of <a href='https://civitai.com/models/24690/comfyui-facerestore-node' target='blank'>facerestore custom node</a> with a bit of a change to support CodeFormer Fidelity parameter. These ComfyUI nodes can be used to restore faces in images similar to the face restore option in AUTOMATIC1111 webui."
"description": "This is a copy of <a href='https://civitai.com/models/24690/comfyui-facerestore-node' target='blank'>facerestore custom node</a> with a bit of a change to support CodeFormer Fidelity parameter. These ComfyUI nodes can be used to restore faces in images similar to the face restore option in AUTOMATIC1111 webui.<BR>NOTE: To use this node, you need to download the face restoration model and face detection model from the 'Install models' menu."
},
{
"author": "braintacles",

3
extension-node-map.json

@ -2069,7 +2069,6 @@
"IterativeLatentUpscale",
"KSamplerAdvancedProvider",
"KSamplerProvider",
"LatentCompositeMasked",
"LatentPixelScale",
"LatentReceiver",
"LatentSender",
@ -2135,13 +2134,11 @@
],
"https://github.com/ltdrdata/ComfyUI-Inspire-Pack": [
[
"Canny",
"Canny_Preprocessor_Provider_for_SEGS //Inspire",
"KSampler //Inspire",
"LoraBlockInfo //Inspire",
"LoraLoaderBlockWeight //Inspire",
"OpenPose_Preprocessor_Provider_for_SEGS //Inspire",
"OpenposePreprocessor",
"XY Input: Lora Block Weight //Inspire"
],
{

60
model-list.json

@ -1092,6 +1092,66 @@
"reference": "https://huggingface.co/furusu/PFG",
"filename": "pfg-wd15beta2-n10.pt",
"url": "https://huggingface.co/furusu/PFG/resolve/main/pfg-wd15beta2-n10.pt"
},
{
"name": "GFPGANv1.4.pth",
"type": "GFPGAN",
"base": "GFPGAN",
"save_path": "facerestore_models",
"description": "Face Restoration Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/TencentARC/GFPGAN/releases",
"filename": "GFPGANv1.4.pth",
"url": "https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/GFPGANv1.4.pth"
},
{
"name": "codeformer.pth",
"type": "CodeFormer",
"base": "CodeFormer",
"save_path": "facerestore_models",
"description": "Face Restoration Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/sczhou/CodeFormer/releases",
"filename": "codeformer.pth",
"url": "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth"
},
{
"name": "detection_Resnet50_Final.pth",
"type": "facexlib",
"base": "facexlib",
"save_path": "facerestore_models",
"description": "Face Detection Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/xinntao/facexlib",
"filename": "detection_Resnet50_Final.pth",
"url": "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth"
},
{
"name": "detection_mobilenet0.25_Final.pth",
"type": "facexlib",
"base": "facexlib",
"save_path": "facerestore_models",
"description": "Face Detection Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/xinntao/facexlib",
"filename": "detection_mobilenet0.25_Final.pth",
"url": "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_mobilenet0.25_Final.pth"
},
{
"name": "yolov5l-face.pth",
"type": "facexlib",
"base": "facexlib",
"save_path": "facedetection",
"description": "Face Detection Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/xinntao/facexlib",
"filename": "yolov5l-face.pth",
"url": "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5l-face.pth"
},
{
"name": "yolov5n-face.pth",
"type": "facexlib",
"base": "facexlib",
"save_path": "facedetection",
"description": "Face Detection Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/xinntao/facexlib",
"filename": "yolov5n-face.pth",
"url": "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5n-face.pth"
}
]
}

2
node_db/new/custom-node-list.json

@ -39,7 +39,7 @@
"https://github.com/mav-rik/facerestore_cf"
],
"install_type": "git-clone",
"description": "This is a copy of <a href='https://civitai.com/models/24690/comfyui-facerestore-node' target='blank'>facerestore custom node</a> with a bit of a change to support CodeFormer Fidelity parameter. These ComfyUI nodes can be used to restore faces in images similar to the face restore option in AUTOMATIC1111 webui."
"description": "This is a copy of <a href='https://civitai.com/models/24690/comfyui-facerestore-node' target='blank'>facerestore custom node</a> with a bit of a change to support CodeFormer Fidelity parameter. These ComfyUI nodes can be used to restore faces in images similar to the face restore option in AUTOMATIC1111 webui.<BR>NOTE: To use this node, you need to download the face restoration model and face detection model from the 'Install models' menu."
},
{
"author": "ArtBot2023",

3
node_db/new/extension-node-map.json

@ -2069,7 +2069,6 @@
"IterativeLatentUpscale",
"KSamplerAdvancedProvider",
"KSamplerProvider",
"LatentCompositeMasked",
"LatentPixelScale",
"LatentReceiver",
"LatentSender",
@ -2135,13 +2134,11 @@
],
"https://github.com/ltdrdata/ComfyUI-Inspire-Pack": [
[
"Canny",
"Canny_Preprocessor_Provider_for_SEGS //Inspire",
"KSampler //Inspire",
"LoraBlockInfo //Inspire",
"LoraLoaderBlockWeight //Inspire",
"OpenPose_Preprocessor_Provider_for_SEGS //Inspire",
"OpenposePreprocessor",
"XY Input: Lora Block Weight //Inspire"
],
{

60
node_db/new/model-list.json

@ -1,5 +1,65 @@
{
"models": [
{
"name": "GFPGANv1.4.pth",
"type": "GFPGAN",
"base": "GFPGAN",
"save_path": "facerestore_models",
"description": "Face Restoration Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/TencentARC/GFPGAN/releases",
"filename": "GFPGANv1.4.pth",
"url": "https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/GFPGANv1.4.pth"
},
{
"name": "codeformer.pth",
"type": "CodeFormer",
"base": "CodeFormer",
"save_path": "facerestore_models",
"description": "Face Restoration Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/sczhou/CodeFormer/releases",
"filename": "codeformer.pth",
"url": "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth"
},
{
"name": "detection_Resnet50_Final.pth",
"type": "facexlib",
"base": "facexlib",
"save_path": "facerestore_models",
"description": "Face Detection Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/xinntao/facexlib",
"filename": "detection_Resnet50_Final.pth",
"url": "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth"
},
{
"name": "detection_mobilenet0.25_Final.pth",
"type": "facexlib",
"base": "facexlib",
"save_path": "facerestore_models",
"description": "Face Detection Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/xinntao/facexlib",
"filename": "detection_mobilenet0.25_Final.pth",
"url": "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_mobilenet0.25_Final.pth"
},
{
"name": "yolov5l-face.pth",
"type": "facexlib",
"base": "facexlib",
"save_path": "facedetection",
"description": "Face Detection Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/xinntao/facexlib",
"filename": "yolov5l-face.pth",
"url": "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5l-face.pth"
},
{
"name": "yolov5n-face.pth",
"type": "facexlib",
"base": "facexlib",
"save_path": "facedetection",
"description": "Face Detection Models. Download the model required for using the 'Facerestore CF (Code Former)' custom node.",
"reference": "https://github.com/xinntao/facexlib",
"filename": "yolov5n-face.pth",
"url": "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/yolov5n-face.pth"
},
{
"name": "ip-adapter-plus_sd15.bin<BR>(install to IPAdapter-ComfyUI)",
"type": "IP-Adapter",

6
scanner.py

@ -20,12 +20,12 @@ def scan_in_file(filename):
nodes = set()
class_dict = {}
pattern2 = r'_CLASS_MAPPINGS\["(.*?)"\]'
pattern2 = r'^[^=]*_CLASS_MAPPINGS\["(.*?)"\]'
keys = re.findall(pattern2, code)
for key in keys:
nodes.add(key.strip())
pattern3 = r'_CLASS_MAPPINGS\[\'(.*?)\'\]'
pattern3 = r'^[^=]*_CLASS_MAPPINGS\[\'(.*?)\'\]'
keys = re.findall(pattern3, code)
for key in keys:
nodes.add(key.strip())
@ -147,7 +147,7 @@ def clone_or_pull_git_repository(git_url):
print(f"Pulling {repo_name} failed: {e}")
else:
try:
repo = Repo.clone_from(git_url, repo_dir, recursive=True)
Repo.clone_from(git_url, repo_dir, recursive=True)
print(f"Cloning {repo_name}...")
except Exception as e:
print(f"Cloning {repo_name} failed: {e}")

Loading…
Cancel
Save