Skip to content

Commit d779996

Browse files
committed
fixed: Issue where an invalid channel exception occurred when using the default channel
- Mismatch issue between ltdrdata/ and Comfy-Org/ modified: /v2/customnode/installed – cnr_id was being returned in a normalized form modified: /v2/customnode/installed – when both an enabled nodepack and a disabled nodepack existed, modified to report only the enabled nodepack fixed: Removed unnecessary warning messages printed during nodepack installation
1 parent 5378f0a commit d779996

File tree

5 files changed

+20
-26
lines changed

5 files changed

+20
-26
lines changed

comfyui_manager/common/cnr_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def read_cnr_info(fullpath):
211211

212212
project = data.get('project', {})
213213
name = project.get('name').strip().lower()
214+
original_name = project.get('name')
214215

215216
# normalize version
216217
# for example: 2.5 -> 2.5.0
@@ -222,6 +223,7 @@ def read_cnr_info(fullpath):
222223
if name and version: # repository is optional
223224
return {
224225
"id": name,
226+
"original_name": original_name,
225227
"version": version,
226228
"url": repository
227229
}

comfyui_manager/glob/manager_core.py

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747

4848
DEFAULT_CHANNEL = "https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main"
49+
DEFAULT_CHANNEL_LEGACY = "https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main"
4950

5051

5152
default_custom_nodes_path = None
@@ -153,14 +154,8 @@ def check(root):
153154
cached_config = None
154155
js_path = None
155156

156-
comfy_ui_required_revision = 1930
157-
comfy_ui_required_commit_datetime = datetime(2024, 1, 24, 0, 0, 0)
158-
159-
comfy_ui_revision = "Unknown"
160-
comfy_ui_commit_datetime = datetime(1900, 1, 1, 0, 0, 0)
161-
162157
channel_dict = None
163-
valid_channels = {'default', 'local'}
158+
valid_channels = {'default', 'local', DEFAULT_CHANNEL, DEFAULT_CHANNEL_LEGACY}
164159
channel_list = None
165160

166161

@@ -1479,7 +1474,7 @@ def identify_node_pack_from_path(fullpath):
14791474
# cnr
14801475
cnr = cnr_utils.read_cnr_info(fullpath)
14811476
if cnr is not None:
1482-
return module_name, cnr['version'], cnr['id'], None
1477+
return module_name, cnr['version'], cnr['original_name'], None
14831478

14841479
return None
14851480
else:
@@ -1529,7 +1524,10 @@ def get_installed_node_packs():
15291524
if info is None:
15301525
continue
15311526

1532-
res[info[0]] = { 'ver': info[1], 'cnr_id': info[2], 'aux_id': info[3], 'enabled': False }
1527+
# NOTE: don't add disabled nodepack if there is enabled nodepack
1528+
original_name = info[0].split('@')[0]
1529+
if original_name not in res:
1530+
res[info[0]] = { 'ver': info[1], 'cnr_id': info[2], 'aux_id': info[3], 'enabled': False }
15331531

15341532
return res
15351533

@@ -1786,16 +1784,6 @@ def try_install_script(url, repo_path, install_cmd, instant_execution=False):
17861784
print(f"\n## ComfyUI-Manager: EXECUTE => {install_cmd}")
17871785
code = manager_funcs.run_script(install_cmd, cwd=repo_path)
17881786

1789-
if platform.system() != "Windows":
1790-
try:
1791-
if not os.environ.get('__COMFYUI_DESKTOP_VERSION__') and comfy_ui_commit_datetime.date() < comfy_ui_required_commit_datetime.date():
1792-
print("\n\n###################################################################")
1793-
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version ({comfy_ui_revision})[{comfy_ui_commit_datetime.date()}] is too old. Please update to the latest version.")
1794-
print("[WARN] The extension installation feature may not work properly in the current installed ComfyUI version on Windows environment.")
1795-
print("###################################################################\n\n")
1796-
except Exception:
1797-
pass
1798-
17991787
if code != 0:
18001788
if url is None:
18011789
url = os.path.dirname(repo_path)

comfyui_manager/legacy/manager_core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747

4848
DEFAULT_CHANNEL = "https://raw.githubusercontent.com/Comfy-Org/ComfyUI-Manager/main"
49+
DEFAULT_CHANNEL_LEGACY = "https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main"
4950

5051

5152
default_custom_nodes_path = None
@@ -160,7 +161,7 @@ def check(root):
160161
comfy_ui_commit_datetime = datetime(1900, 1, 1, 0, 0, 0)
161162

162163
channel_dict = None
163-
valid_channels = {'default', 'local'}
164+
valid_channels = {'default', 'local', DEFAULT_CHANNEL, DEFAULT_CHANNEL_LEGACY}
164165
channel_list = None
165166

166167

comfyui_manager/legacy/manager_server.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,12 +1072,15 @@ async def fetch_customnode_list(request):
10721072
if channel != 'local':
10731073
found = 'custom'
10741074

1075-
for name, url in core.get_channel_dict().items():
1076-
if url == channel:
1077-
found = name
1078-
break
1075+
if channel == core.DEFAULT_CHANNEL or channel == core.DEFAULT_CHANNEL_LEGACY:
1076+
channel = 'default'
1077+
else:
1078+
for name, url in core.get_channel_dict().items():
1079+
if url == channel:
1080+
found = name
1081+
break
10791082

1080-
channel = found
1083+
channel = found
10811084

10821085
result = dict(channel=channel, node_packs=node_packs.to_dict())
10831086

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "comfyui-manager"
77
license = { text = "GPL-3.0-only" }
8-
version = "4.0.1-beta.4"
8+
version = "4.0.1-beta.5"
99
requires-python = ">= 3.9"
1010
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
1111
readme = "README.md"

0 commit comments

Comments
 (0)