Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions comfy_cli/command/custom_nodes/cm_cli_util.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@
print("\n[bold red]ComfyUI path is not resolved.[/bold red]\n", file=sys.stderr)
raise typer.Exit(code=1)

cm_cli_path = os.path.join(workspace_path, "custom_nodes", "ComfyUI-Manager", "cm-cli.py")
if not os.path.exists(cm_cli_path):
cm_path = workspace_manager.get_comfyui_manager_path()
if cm_path is None:

Check warning on line 34 in comfy_cli/command/custom_nodes/cm_cli_util.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/custom_nodes/cm_cli_util.py#L33-L34

Added lines #L33 - L34 were not covered by tests
print(
f"\n[bold red]ComfyUI-Manager not found: {cm_cli_path}[/bold red]\n",
f"\n[bold red]ComfyUI-Manager not found: {cm_path}[/bold red]\n",
file=sys.stderr,
)
raise typer.Exit(code=1)

cm_cli_path = os.path.join(cm_path, "cm-cli.py")

Check warning on line 41 in comfy_cli/command/custom_nodes/cm_cli_util.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/custom_nodes/cm_cli_util.py#L41

Added line #L41 was not covered by tests

cmd = [sys.executable, cm_cli_path] + args

if channel is not None:
Expand Down
10 changes: 9 additions & 1 deletion comfy_cli/command/custom_nodes/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,15 @@
config_manager = ConfigManager()
workspace_path = workspace_manager.workspace_path

cm_cli_path = os.path.join(workspace_path, "custom_nodes", "ComfyUI-Manager", "cm-cli.py")
cm_path = workspace_manager.get_comfyui_manager_path()
if cm_path is None:
print(

Check warning on line 487 in comfy_cli/command/custom_nodes/command.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/custom_nodes/command.py#L485-L487

Added lines #L485 - L487 were not covered by tests
f"\n[bold red]ComfyUI-Manager not found: {cm_path}[/bold red]\n",
file=sys.stderr,
)
raise typer.Exit(code=1)

Check warning on line 491 in comfy_cli/command/custom_nodes/command.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/custom_nodes/command.py#L491

Added line #L491 was not covered by tests

cm_cli_path = os.path.join(cm_path, "cm-cli.py")

Check warning on line 493 in comfy_cli/command/custom_nodes/command.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/custom_nodes/command.py#L493

Added line #L493 was not covered by tests

tmp_path = os.path.join(config_manager.get_config_path(), "tmp")
if not os.path.exists(tmp_path):
Expand Down
4 changes: 2 additions & 2 deletions comfy_cli/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@

# install requirements for manager
def pip_install_manager_dependencies(repo_dir):
os.chdir(os.path.join(repo_dir, "custom_nodes", "ComfyUI-Manager"))
os.chdir(os.path.join(repo_dir, "custom_nodes", "comfyui-manager"))

Check warning on line 159 in comfy_cli/command/install.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/install.py#L159

Added line #L159 was not covered by tests
subprocess.run([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"], check=True)


Expand Down Expand Up @@ -229,7 +229,7 @@
if skip_manager:
rprint("Skipping installation of ComfyUI-Manager. (by --skip-manager)")
else:
manager_repo_dir = os.path.join(repo_dir, "custom_nodes", "ComfyUI-Manager")
manager_repo_dir = os.path.join(repo_dir, "custom_nodes", "comfyui-manager")

Check warning on line 232 in comfy_cli/command/install.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/install.py#L232

Added line #L232 was not covered by tests

if os.path.exists(manager_repo_dir):
if restore and not fast_deps:
Expand Down
18 changes: 14 additions & 4 deletions comfy_cli/workspace_manager.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,26 @@
if self.workspace_path is None:
return None

# To check more robustly, verify up to the `.git` path.
manager_path = os.path.join(self.workspace_path, "custom_nodes", "ComfyUI-Manager")
return manager_path
# ComfyUI-Manager may in lower case folder name (registry name)
possible_paths = [

Check warning on line 266 in comfy_cli/workspace_manager.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/workspace_manager.py#L266

Added line #L266 was not covered by tests
os.path.join(self.workspace_path, "custom_nodes", "ComfyUI-Manager"),
os.path.join(self.workspace_path, "custom_nodes", "comfyui-manager")
]
for manager_path in possible_paths:
if os.path.exists(manager_path):
return manager_path
return None

Check warning on line 273 in comfy_cli/workspace_manager.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/workspace_manager.py#L270-L273

Added lines #L270 - L273 were not covered by tests

def is_comfyui_manager_installed(self):
if self.workspace_path is None:
return False

manager_path = self.get_comfyui_manager_path()
if manager_path is None:
return False

Check warning on line 281 in comfy_cli/workspace_manager.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/workspace_manager.py#L279-L281

Added lines #L279 - L281 were not covered by tests

# To check more robustly, verify up to the `.git` path.
manager_git_path = os.path.join(self.workspace_path, "custom_nodes", "ComfyUI-Manager", ".git")
manager_git_path = os.path.join(manager_path, ".git")

Check warning on line 284 in comfy_cli/workspace_manager.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/workspace_manager.py#L284

Added line #L284 was not covered by tests
return os.path.exists(manager_git_path)

def scan_dir(self):
Expand Down
Loading