From 952613c07ba2b254df6fbdf75ac8e4340b3468a2 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Mon, 15 Dec 2025 02:54:30 +0900 Subject: [PATCH] fix(api): improve import_fail_info_bulk lookup for cnr_id and aux_id - Add aux_id format (author/repo) support in normalize_to_github_id() - Fix get_module_name() to use URL normalization for unknown_active_nodes - Use NormalizedKeyDict in reload() to maintain normalized key lookup --- comfyui_manager/common/git_utils.py | 6 ++++++ comfyui_manager/glob/manager_core.py | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/comfyui_manager/common/git_utils.py b/comfyui_manager/common/git_utils.py index 1fe36cd2..4ffaf275 100644 --- a/comfyui_manager/common/git_utils.py +++ b/comfyui_manager/common/git_utils.py @@ -74,6 +74,12 @@ def normalize_to_github_id(url) -> str: return f"{author}/{repo_name}" + # Handle short format like "author/repo" (aux_id format) + if '/' in url and not url.startswith('http'): + parts = url.split('/') + if len(parts) == 2 and parts[0] and parts[1]: + return url + return None diff --git a/comfyui_manager/glob/manager_core.py b/comfyui_manager/glob/manager_core.py index 72b76857..bb55eb81 100644 --- a/comfyui_manager/glob/manager_core.py +++ b/comfyui_manager/glob/manager_core.py @@ -384,8 +384,10 @@ class UnifiedManager: def get_module_name(self, x): info = self.active_nodes.get(x) if info is None: + # Try to find in unknown_active_nodes by comparing normalized URLs + normalized_x = git_utils.normalize_url(x) for url, fullpath in self.unknown_active_nodes.values(): - if url == x: + if url is not None and git_utils.normalize_url(url) == normalized_x: return os.path.basename(fullpath) else: return os.path.basename(info[1]) @@ -700,11 +702,11 @@ class UnifiedManager: import folder_paths self.custom_node_map_cache = {} - self.cnr_inactive_nodes = {} # node_id -> node_version -> fullpath - self.nightly_inactive_nodes = {} # node_id -> fullpath + self.cnr_inactive_nodes = NormalizedKeyDict() # node_id -> node_version -> fullpath + self.nightly_inactive_nodes = NormalizedKeyDict() # node_id -> fullpath self.unknown_inactive_nodes = {} # node_id -> repo url * fullpath self.unknown_active_nodes = {} # node_id -> repo url * fullpath - self.active_nodes = {} # node_id -> node_version * fullpath + self.active_nodes = NormalizedKeyDict() # node_id -> node_version * fullpath if get_config()['network_mode'] != 'public' or manager_util.is_manager_pip_package(): dont_wait = True