From 0bc9c5e4b4a137ddf837a1d8b0f1651f4ce10a20 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sat, 1 Jul 2023 09:31:35 +0900 Subject: [PATCH] bugfix: invalid layout bugfix: scanner.py for CP949 update DB --- custom-node-list.json | 10 ++++++++++ extension-node-map.json | 5 +++++ js/comfyui-manager.js | 12 +++++++++--- scanner.py | 8 ++++++-- 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/custom-node-list.json b/custom-node-list.json index 6e48031e..5ff90e16 100644 --- a/custom-node-list.json +++ b/custom-node-list.json @@ -475,6 +475,16 @@ "install_type": "git-clone", "description": "This extension provides the ability to combine multiple nodes into a single node." }, + { + "author": "ssitu", + "title": "Restart Sampling", + "reference": "https://github.com/ssitu/ComfyUI_restart_sampling", + "files": [ + "https://github.com/ssitu/ComfyUI_restart_sampling" + ], + "install_type": "git-clone", + "description": "Unofficial ComfyUI nodes for restart sampling based on the paper 'Restart Sampling for Improving Generative Processes' [paper] [repo]" + }, { "author": "space-nuko", "title": "Disco Diffusion", diff --git a/extension-node-map.json b/extension-node-map.json index 4746aaa2..35fb6bdf 100644 --- a/extension-node-map.json +++ b/extension-node-map.json @@ -858,6 +858,9 @@ "UltimateSDUpscale", "UltimateSDUpscaleNoUpscale" ], + "https://github.com/ssitu/ComfyUI_restart_sampling": [ + "KRestartSampler" + ], "https://github.com/strimmlarn/ComfyUI_Strimmlarns_aesthetic_score": [ "AesthetlcScoreSorter", "CalculateAestheticScore", @@ -879,7 +882,9 @@ "Auto Merge Block Weighted" ], "https://github.com/taabata/Comfy_Syrian_Falcon_Nodes/raw/main/SyrianFalconNodes.py": [ + "CompositeImage", "KSamplerAdvancedCustom", + "QRGenerate", "WordAsImage" ], "https://github.com/trojblue/trNodes": [ diff --git a/js/comfyui-manager.js b/js/comfyui-manager.js index af3fa331..862ff52d 100644 --- a/js/comfyui-manager.js +++ b/js/comfyui-manager.js @@ -400,9 +400,15 @@ class CustomNodesInstaller extends ComfyDialog { data1.style.textAlign = "center"; data1.innerHTML = i+1; var data2 = document.createElement('td'); - data2.innerHTML = ` ${data.author}`; - var data3 = document.createElement('td'); - data3.innerHTML = ` ${data.title}`; + data2.style.maxWidth = "100px"; + data2.textContent = ` ${data.author}`; + data2.style.whiteSpace = "nowrap"; + data2.style.overflow = "hidden"; + data2.style.textOverflow = "ellipsis"; + var data3 = document.createElement('td'); + data3.style.maxWidth = "200px"; + data3.style.wordWrap = "break-word"; + data3.innerHTML = ` ${data.title}`; var data4 = document.createElement('td'); data4.innerHTML = data.description; var data5 = document.createElement('td'); diff --git a/scanner.py b/scanner.py index 8e07d90b..2c3483da 100644 --- a/scanner.py +++ b/scanner.py @@ -6,8 +6,12 @@ from torchvision.datasets.utils import download_url def scan_in_file(filename): - with open(filename, "r") as file: - code = file.read() + try: + with open(filename, encoding='utf-8') as file: + code = file.read() + except UnicodeDecodeError: + with open(filename, encoding='cp949') as file: + code = file.read() pattern = r"NODE_CLASS_MAPPINGS\s*=\s*{([^}]*)}" regex = re.compile(pattern, re.MULTILINE | re.DOTALL)