mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 18:02:58 +08:00
fix: installed nodes should still be initialized in offline mode
This commit is contained in:
parent
9dc8e630a0
commit
29ca93fcb4
@ -728,7 +728,7 @@ class UnifiedManager:
|
|||||||
|
|
||||||
return latest
|
return latest
|
||||||
|
|
||||||
async def reload(self, cache_mode, dont_wait=True):
|
async def reload(self, cache_mode, dont_wait=True, update_cnr_map=True):
|
||||||
self.custom_node_map_cache = {}
|
self.custom_node_map_cache = {}
|
||||||
self.cnr_inactive_nodes = {} # node_id -> node_version -> fullpath
|
self.cnr_inactive_nodes = {} # node_id -> node_version -> fullpath
|
||||||
self.nightly_inactive_nodes = {} # node_id -> fullpath
|
self.nightly_inactive_nodes = {} # node_id -> fullpath
|
||||||
@ -739,14 +739,15 @@ class UnifiedManager:
|
|||||||
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
|
||||||
|
|
||||||
# reload 'cnr_map' and 'repo_cnr_map'
|
if update_cnr_map:
|
||||||
cnrs = await cnr_utils.get_cnr_data(cache_mode=cache_mode=='cache', dont_wait=dont_wait)
|
# reload 'cnr_map' and 'repo_cnr_map'
|
||||||
|
cnrs = await cnr_utils.get_cnr_data(cache_mode=cache_mode=='cache', dont_wait=dont_wait)
|
||||||
|
|
||||||
for x in cnrs:
|
for x in cnrs:
|
||||||
self.cnr_map[x['id']] = x
|
self.cnr_map[x['id']] = x
|
||||||
if 'repository' in x:
|
if 'repository' in x:
|
||||||
normalized_url = git_utils.normalize_url(x['repository'])
|
normalized_url = git_utils.normalize_url(x['repository'])
|
||||||
self.repo_cnr_map[normalized_url] = x
|
self.repo_cnr_map[normalized_url] = x
|
||||||
|
|
||||||
# reload node status info from custom_nodes/*
|
# reload node status info from custom_nodes/*
|
||||||
for custom_nodes_path in folder_paths.get_folder_paths('custom_nodes'):
|
for custom_nodes_path in folder_paths.get_folder_paths('custom_nodes'):
|
||||||
|
|||||||
@ -1685,6 +1685,8 @@ async def default_cache_update():
|
|||||||
# load at least once
|
# load at least once
|
||||||
await core.unified_manager.reload('remote', dont_wait=False)
|
await core.unified_manager.reload('remote', dont_wait=False)
|
||||||
await core.unified_manager.get_custom_nodes(channel_url, 'remote')
|
await core.unified_manager.get_custom_nodes(channel_url, 'remote')
|
||||||
|
else:
|
||||||
|
await core.unified_manager.reload('remote', dont_wait=False, update_cnr_map=False)
|
||||||
|
|
||||||
logging.info("[ComfyUI-Manager] All startup tasks have been completed.")
|
logging.info("[ComfyUI-Manager] All startup tasks have been completed.")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user