From 8410e02c02fcf2d48ceff65fdb20803a21484bfe Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Tue, 18 Jul 2023 10:39:23 +0900 Subject: [PATCH] update scanner.py update DB --- custom-node-list.json | 10 ++++++++ extension-node-map.json | 54 +++++++++++++++++++++++++++++++++++++++++ scanner.py | 24 ++++++++++++++++++ 3 files changed, 88 insertions(+) diff --git a/custom-node-list.json b/custom-node-list.json index 04aa25e6..1934c78c 100644 --- a/custom-node-list.json +++ b/custom-node-list.json @@ -784,6 +784,16 @@ "install_type": "copy", "description": "Nodes:SDXLMixSampler" }, + { + "author": "alpertunga-bile", + "title": "prompt-generator", + "reference": "https://github.com/alpertunga-bile/prompt-generator-comfyui", + "files": [ + "https://github.com/alpertunga-bile/prompt-generator-comfyui/raw/master/prompt_generator.py" + ], + "install_type": "copy", + "description": "Nodes:Prompt Generator. Custom prompt generator node for ComfyUI." + }, { "author": "theally", "title": "TheAlly's Custom Nodes", diff --git a/extension-node-map.json b/extension-node-map.json index 62cae143..5f5006b3 100644 --- a/extension-node-map.json +++ b/extension-node-map.json @@ -381,6 +381,12 @@ "LatentSelector" ], "https://github.com/SeargeDP/SeargeSDXL": [ + "SeargeFloatConstant", + "SeargeFloatMath", + "SeargeFloatPair", + "SeargeIntegerConstant", + "SeargeIntegerMath", + "SeargeIntegerPair", "SeargePromptCombiner", "SeargePromptText", "SeargeSDXLPromptEncoder", @@ -612,6 +618,9 @@ "ImageRewardLoader", "ImageRewardScore" ], + "https://github.com/alpertunga-bile/prompt-generator-comfyui/raw/master/prompt_generator.py": [ + "Prompt Generator" + ], "https://github.com/biegert/ComfyUI-CLIPSeg/raw/main/custom_nodes/clipseg.py": [ "CLIPSeg", "CombineSegMasks" @@ -824,6 +833,51 @@ "RawTextEncode", "RawTextReplace" ], + "https://github.com/melMass/comfy_mtb": [ + "B Box From Mask (mtb)", + "Blur (mtb)", + "Bounding Box (mtb)", + "Color Correct (mtb)", + "Colored Image (mtb)", + "Concat Images (mtb)", + "Crop (mtb)", + "Deep Bump (mtb)", + "Deglaze Image (mtb)", + "Denoise (mtb)", + "Export To Prores (mtb)", + "Face Swap (mtb)", + "Film Interpolation (mtb)", + "Float To Number (mtb)", + "Get Batch From History (mtb)", + "Hsv To Rgb (mtb)", + "Image Compare (mtb)", + "Image Premultiply (mtb)", + "Image Remove Background Rembg (mtb)", + "Image Resize Factor (mtb)", + "Int To Bool (mtb)", + "Int To Number (mtb)", + "Latent Lerp (mtb)", + "Latent Noise (mtb)", + "Latent Transform (mtb)", + "Load Face Enhance Model (mtb)", + "Load Face Swap Model (mtb)", + "Load Film Model (mtb)", + "Load Image From Url (mtb)", + "Load Image Sequence (mtb)", + "Mask To Image (mtb)", + "Mtb Examples (mtb)", + "Qr Code (mtb)", + "Restore Face (mtb)", + "Rgb To Hsv (mtb)", + "Save Image Grid (mtb)", + "Save Image Sequence (mtb)", + "Save Tensors (mtb)", + "Smart Step (mtb)", + "String Replace (mtb)", + "Styles Loader (mtb)", + "Text To Image (mtb)", + "Uncrop (mtb)" + ], "https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92": [ "CLIPStringEncode _O", "Chat completion _O", diff --git a/scanner.py b/scanner.py index 2c3483da..295208c5 100644 --- a/scanner.py +++ b/scanner.py @@ -163,6 +163,7 @@ def update_custom_nodes(): def gen_json(node_info): + # scan from .py file node_files, node_dirs = get_nodes(".tmp") data = {} @@ -200,6 +201,29 @@ def gen_json(node_info): else: print(f"Missing info: {url}") + # scan from node_list.json file + extensions = [name for name in os.listdir('.tmp') if os.path.isdir(os.path.join('.tmp', name))] + + for extension in extensions: + node_list_json_path = os.path.join('.tmp', extension, 'node_list.json') + if os.path.exists(node_list_json_path): + git_url = node_info[extension] + + with open(node_list_json_path, 'r') as f: + node_list_json = json.load(f) + + if git_url not in data: + nodes = set() + else: + nodes = set(data[git_url]) + + for x, desc in node_list_json.items(): + nodes.add(x) + + nodes = list(nodes) + nodes.sort() + data[git_url] = nodes + json_path = f"extension-node-map.json" with open(json_path, "w") as file: json.dump(data, file, indent=4, sort_keys=True)