Skip to content
Merged
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
4 changes: 1 addition & 3 deletions .github/workflows/test-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ jobs:
python -m pip install --upgrade pip
pip install -e .
comfy --skip-prompt --workspace ./ComfyUI install --fast-deps --m-series --skip-manager
comfy --workspace ./ComfyUI standalone --platform macos
comfy standalone --rehydrate
./python/bin/python ComfyUI/main.py --cpu --quick-test-for-ci
comfy --here launch -- --cpu --quick-test-for-ci
5 changes: 1 addition & 4 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,4 @@ jobs:
pip install pytest
pip install -e .
comfy --skip-prompt --workspace ./ComfyUI install --fast-deps --nvidia --cuda-version 12.6 --skip-manager
comfy --workspace ./ComfyUI standalone --platform windows --proc x86_64
ls
comfy standalone --rehydrate --platform windows --proc x86_64
./python/python.exe ComfyUI/main.py --cpu --quick-test-for-ci
comfy --here launch -- --cpu --quick-test-for-ci
19 changes: 19 additions & 0 deletions comfy_cli/command/custom_nodes/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import typer
from rich import print
from rich.console import Console
from typing_extensions import Annotated, List

from comfy_cli import logging, tracking, ui, utils
Expand All @@ -28,6 +29,7 @@
)
from comfy_cli.workspace_manager import WorkspaceManager

console = Console()
app = typer.Typer()
app.add_typer(bisect_app, name="bisect", help="Bisect custom nodes for culprit node.")
manager_app = typer.Typer()
Expand Down Expand Up @@ -918,3 +920,20 @@
zip_files(zip_filename)
typer.echo(f"Created zip file: {NODE_ZIP_FILENAME}")
logging.info("Node has been packed successfully.")


@app.command("scaffold", help="Create a new ComfyUI custom node project using cookiecutter")
@tracking.track_command("node")
def scaffold_cookiecutter():
"""Create a new ComfyUI custom node project using cookiecutter."""
import cookiecutter.main

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

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/custom_nodes/command.py#L929

Added line #L929 was not covered by tests

try:
cookiecutter.main.cookiecutter(

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

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/custom_nodes/command.py#L931-L932

Added lines #L931 - L932 were not covered by tests
"https://github.com/Comfy-Org/cookiecutter-comfy-extension.git",
overwrite_if_exists=True,
)
console.print("[bold green]✓ Custom node project created successfully![/bold green]")
except Exception as e:
console.print(f"[bold red]Error creating project: {str(e)}[/bold red]")
raise typer.Exit(code=1)

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

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/custom_nodes/command.py#L936-L939

Added lines #L936 - L939 were not covered by tests
2 changes: 1 addition & 1 deletion comfy_cli/command/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
exit(res)

if not os.path.exists(reboot_path):
exit(res)
exit(res.returncode)

Check warning on line 51 in comfy_cli/command/launch.py

View check run for this annotation

Codecov / codecov/patch

comfy_cli/command/launch.py#L51

Added line #L51 was not covered by tests

os.remove(reboot_path)
else:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies = [
"websocket-client",
"ruff",
"semver~=3.0.2",
"cookiecutter",
]

[project.optional-dependencies]
Expand Down
Loading