fixed: cm-cli - provides pip dependency restoration using the options --pip-non-url, --pip-non-local-url, and --pip-local-url.

https://github.com/Comfy-Org/ComfyUI-Manager/issues/2008
This commit is contained in:
Dr.Lt.Data
2025-07-19 06:51:07 +09:00
parent e894bd9f24
commit 03ccce2804
6 changed files with 827 additions and 752 deletions

View File

@@ -43,7 +43,7 @@ import manager_downloader
from node_package import InstalledNodePackage
version_code = [3, 34]
version_code = [3, 34, 1]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
@@ -3111,6 +3111,11 @@ async def restore_snapshot(snapshot_path, git_helper_extras=None):
info = yaml.load(snapshot_file, Loader=yaml.SafeLoader)
info = info['custom_nodes']
if 'pips' in info and info['pips']:
pips = info['pips']
else:
pips = {}
# for cnr restore
cnr_info = info.get('cnr_custom_nodes')
if cnr_info is not None:
@@ -3317,6 +3322,8 @@ async def restore_snapshot(snapshot_path, git_helper_extras=None):
unified_manager.repo_install(repo_url, to_path, instant_execution=True, no_deps=False, return_postinstall=False)
cloned_repos.append(repo_name)
manager_util.restore_pip_snapshot(pips, git_helper_extras)
# print summary
for x in cloned_repos:
print(f"[ INSTALLED ] {x}")