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
45 changes: 35 additions & 10 deletions DEV_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,24 +124,49 @@ def remove(name: str):
- For progress reporting, use either [`rich.progress`](https://rich.readthedocs.io/en/stable/progress.html)

## Develop comfy-cli and ComfyUI-Manager (cm-cli) together

ComfyUI-Manager is now installed as a pip package (via `manager_requirements.txt`
in the ComfyUI root) rather than being git-cloned into `custom_nodes/`.

### Making changes to both
1. Fork your own branches of `comfy-cli` and `ComfyUI-Manager`, make changes
2. Be sure to commit any changes to `ComfyUI-Manager` to a new branch, and push to remote
1. Fork your own branches of `comfy-cli` and `ComfyUI-Manager`, make changes.
2. Live-install `comfy-cli`:
- `pip install -e /path/to/comfy-cli`
3. Live-install your fork of `ComfyUI-Manager` in editable mode:
- `pip install -e /path/to/ComfyUI-Manager`
4. This makes the `cm-cli` entry point available and points it at your local source.

### Trying changes to both
1. clone the changed branch of `comfy-cli`, then live install `comfy-cli`:
- `pip install -e comfy-cli`
1. Install both packages in editable mode as described above.
2. Go to a test dir and run:
- `comfy --here install --manager-url=<path-or-url-to-fork-of-ComfyUI-Manager>`
3. Run:
- `cd ComfyUI/custom_nodes/ComfyUI-Manager/ && git checkout <changed-branch> && cd -`
4. Further changes can be pulled into these copies of the `comfy-cli` and `ComfyUI-Manager` repos
- `comfy --here install`
3. The `cm-cli` command will resolve to your locally installed editable package.

### Debugging both simultaneously
1. Follow instructions above to get working install with changes
1. Follow instructions above to get working install with changes.
2. Add breakpoints directly to code: `import ipdb; ipdb.set_trace()`
3. Execute relevant `comfy-cli` command
3. Execute relevant `comfy-cli` command.


## Running E2E tests

E2E tests perform real `comfy install`, `comfy launch`, and `comfy node` operations.
They are **disabled by default** and must be explicitly enabled.

```bash
TEST_E2E=true pytest tests/e2e/
```

For pre-release testing against alternate ComfyUI repositories (e.g. Manager v4):

```bash
TEST_E2E=true \
TEST_E2E_COMFY_URL="https://github.com/ltdrdata/ComfyUI.git@dr-bump-manager" \
pytest tests/e2e/ -v
```

See [docs/TESTING-e2e.md](docs/TESTING-e2e.md) for the full guide including
environment variables, test suite details, and scenario descriptions.

## Contact

Expand Down
71 changes: 66 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ system. If you run in a ComfyUI repo that has already been setup. The command
will simply update the comfy.yaml file to reflect the local setup

- `comfy install --skip-manager`: Install ComfyUI without ComfyUI-Manager.
To use a custom Manager fork or specific version, skip the default installation
and install your own into the workspace venv:
```bash
comfy install --skip-manager
# Then install your custom Manager:
pip install -e /path/to/your-manager-fork # editable install
# or
pip install comfyui-manager==4.1b8 # specific version
```
- `comfy --workspace=<path> install`: Install ComfyUI into `<path>/ComfyUI`.
- For `comfy install`, if no path specification like `--workspace, --recent, or --here` is provided, it will be implicitly installed in `<HOME>/comfy`.

Expand All @@ -75,7 +84,7 @@ will simply update the comfy.yaml file to reflect the local setup
- Example 1: To run the recently executed ComfyUI:
- `comfy --recent launch`
- Example 2: To install a package on the ComfyUI in the current directory:
- `comfy --here node install ComfyUI-Impact-Pack`
- `comfy --here node install comfyui-impact-pack`
- Example 3: To update the automatically selected path of ComfyUI and custom nodes based on priority:

- `comfy node update all`
Expand Down Expand Up @@ -168,7 +177,7 @@ comfy node [show|simple-show] [installed|enabled|not-installed|disabled|all|snap

`comfy node update all`

`comfy node install ComfyUI-Impact-Pack`
`comfy node install comfyui-impact-pack`

- Managing snapshot:

Expand All @@ -186,6 +195,32 @@ comfy node [show|simple-show] [installed|enabled|not-installed|disabled|all|snap

`comfy node deps-in-workflow --workflow=<workflow .json/.png file> --output=<output deps .json file>`

#### Unified Dependency Resolution (--uv-compile)

Requires ComfyUI-Manager v4.1+. Instead of installing dependencies per-node with
`pip install`, `--uv-compile` batch-resolves all custom node dependencies via
`uv pip compile` to avoid version conflicts.

- Install with unified resolution:

`comfy node install comfyui-impact-pack --uv-compile`

- Available on: `install`, `reinstall`, `update`, `fix`, `restore-snapshot`,
`restore-dependencies`, `install-deps`

- Run standalone (resolve all existing custom node dependencies):

`comfy node uv-sync`

- `--uv-compile` is mutually exclusive with `--fast-deps` and `--no-deps`.

- To make `--uv-compile` the default for all commands, see
[uv-compile default](#uv-compile-default) below.

- Use `--no-uv-compile` to override the default for a single command:

`comfy node install comfyui-impact-pack --no-uv-compile`

#### Bisect custom nodes

If you encounter bugs only with custom nodes enabled, and want to find out which custom node(s) causes the bug,
Expand Down Expand Up @@ -216,18 +251,44 @@ the bisect tool can help you pinpoint the custom node that causes the issue.

### Managing ComfyUI-Manager

- disable GUI of ComfyUI-Manager (disable Manager menu and Server)
- Disable ComfyUI-Manager completely (no manager flags passed to ComfyUI):

`comfy manager disable-gui`
`comfy manager disable`

- enable GUI of ComfyUI-Manager
- Enable ComfyUI-Manager with new GUI:

`comfy manager enable-gui`

- Enable ComfyUI-Manager without GUI (manager runs but UI is hidden):

`comfy manager disable-gui`

- Enable ComfyUI-Manager with legacy GUI:

`comfy manager enable-legacy-gui`

- Clear reserved startup action:

`comfy manager clear`

- Migrate legacy git-cloned ComfyUI-Manager to pip package:

`comfy manager migrate-legacy`

#### uv-compile default

Set `--uv-compile` as the default behavior for all custom node operations:

`comfy manager uv-compile-default true`

When enabled, all node commands (`install`, `reinstall`, `update`, `fix`,
`restore-snapshot`, `restore-dependencies`, `install-deps`) will automatically
use `--uv-compile`. Use `--no-uv-compile` on any individual command to override.

To disable:

`comfy manager uv-compile-default false`

## Beta Feature: format of comfy-lock.yaml (WIP)

```
Expand Down
15 changes: 0 additions & 15 deletions comfy_cli/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@ def install(
callback=validate_version,
),
] = "nightly",
manager_url: Annotated[
str,
typer.Option(
show_default=False,
help="url or local path pointing to the ComfyUI-Manager git repo to be installed. A specific branch can optionally be specified using a setuptools-like syntax, eg https://foo.git@bar",
),
] = constants.COMFY_MANAGER_GITHUB_URL,
restore: Annotated[
bool,
typer.Option(
Expand Down Expand Up @@ -239,10 +232,6 @@ def install(
help="Use new fast dependency installer",
),
] = False,
manager_commit: Annotated[
str | None,
typer.Option(help="Specify commit hash for ComfyUI-Manager"),
] = None,
pr: Annotated[
str | None,
typer.Option(
Expand Down Expand Up @@ -280,7 +269,6 @@ def install(
rprint("[bold yellow]Installing for CPU[/bold yellow]")
install_inner.execute(
url,
manager_url,
comfy_path,
restore,
skip_manager,
Expand All @@ -293,7 +281,6 @@ def install(
skip_torch_or_directml=skip_torch_or_directml,
skip_requirement=skip_requirement,
fast_deps=fast_deps,
manager_commit=manager_commit,
pr=pr,
)
rprint(f"ComfyUI is installed at: {comfy_path}")
Expand Down Expand Up @@ -336,7 +323,6 @@ def install(

install_inner.execute(
url,
manager_url,
comfy_path,
restore,
skip_manager,
Expand All @@ -349,7 +335,6 @@ def install(
skip_torch_or_directml=skip_torch_or_directml,
skip_requirement=skip_requirement,
fast_deps=fast_deps,
manager_commit=manager_commit,
pr=pr,
)

Expand Down
Loading
Loading