fix: installed nodes should still be initialized in offline mode

This commit is contained in:
bymyself 2025-04-11 15:55:11 -07:00
parent 9dc8e630a0
commit 29ca93fcb4
2 changed files with 11 additions and 8 deletions

View File

@ -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,6 +739,7 @@ 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
if update_cnr_map:
# reload 'cnr_map' and 'repo_cnr_map' # reload 'cnr_map' and 'repo_cnr_map'
cnrs = await cnr_utils.get_cnr_data(cache_mode=cache_mode=='cache', dont_wait=dont_wait) cnrs = await cnr_utils.get_cnr_data(cache_mode=cache_mode=='cache', dont_wait=dont_wait)

View File

@ -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.")