mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 18:02:58 +08:00
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
This commit is contained in:
parent
75f27d99e2
commit
952613c07b
@ -74,6 +74,12 @@ def normalize_to_github_id(url) -> str:
|
|||||||
|
|
||||||
return f"{author}/{repo_name}"
|
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
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -384,8 +384,10 @@ class UnifiedManager:
|
|||||||
def get_module_name(self, x):
|
def get_module_name(self, x):
|
||||||
info = self.active_nodes.get(x)
|
info = self.active_nodes.get(x)
|
||||||
if info is None:
|
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():
|
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)
|
return os.path.basename(fullpath)
|
||||||
else:
|
else:
|
||||||
return os.path.basename(info[1])
|
return os.path.basename(info[1])
|
||||||
@ -700,11 +702,11 @@ class UnifiedManager:
|
|||||||
import folder_paths
|
import folder_paths
|
||||||
|
|
||||||
self.custom_node_map_cache = {}
|
self.custom_node_map_cache = {}
|
||||||
self.cnr_inactive_nodes = {} # node_id -> node_version -> fullpath
|
self.cnr_inactive_nodes = NormalizedKeyDict() # node_id -> node_version -> fullpath
|
||||||
self.nightly_inactive_nodes = {} # node_id -> fullpath
|
self.nightly_inactive_nodes = NormalizedKeyDict() # node_id -> fullpath
|
||||||
self.unknown_inactive_nodes = {} # node_id -> repo url * fullpath
|
self.unknown_inactive_nodes = {} # node_id -> repo url * fullpath
|
||||||
self.unknown_active_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():
|
if get_config()['network_mode'] != 'public' or manager_util.is_manager_pip_package():
|
||||||
dont_wait = True
|
dont_wait = True
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user