Skip to content

Commit d3d613c

Browse files
committed
improved: cm-cli.sh - add --restore-to option to restore-snapshot command
1 parent 86893d9 commit d3d613c

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

cm-cli.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ def set_user_directory(self, user_directory):
152152
if y != '':
153153
cm_global.pip_blacklist.add(y)
154154

155+
def update_custom_nodes_dir(self, target_dir):
156+
import folder_paths
157+
a, b = folder_paths.folder_names_and_paths['custom_nodes']
158+
folder_paths.folder_names_and_paths['custom_nodes'] = [os.path.abspath(target_dir)], set()
159+
155160
@staticmethod
156161
def get_startup_scripts_path():
157162
return os.path.join(core.manager_startup_script_path, "install-scripts.txt")
@@ -1075,10 +1080,17 @@ def restore_snapshot(
10751080
user_directory: str = typer.Option(
10761081
None,
10771082
help="user directory"
1083+
),
1084+
restore_to: Optional[str] = typer.Option(
1085+
None,
1086+
help="Manually specify the installation path for the custom node. Ignore user directory."
10781087
)
10791088
):
10801089
cmd_ctx.set_user_directory(user_directory)
10811090

1091+
if restore_to:
1092+
cmd_ctx.update_custom_nodes_dir(restore_to)
1093+
10821094
extras = []
10831095
if pip_non_url:
10841096
extras.append('--pip-non-url')

glob/manager_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
from node_package import InstalledNodePackage
4343

4444

45-
version_code = [3, 26, 1]
45+
version_code = [3, 26, 2]
4646
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
4747

4848

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "comfyui-manager"
33
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
4-
version = "3.26.1"
4+
version = "3.26.2"
55
license = { file = "LICENSE.txt" }
66
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions", "toml", "uv", "chardet"]
77

0 commit comments

Comments
 (0)