Skip to content

feat: add ComfyUI-Manager v4 support and uv-compile unified dependency resolution#363

Merged
bigcat88 merged 1 commit intomainfrom
feat/support-manager-v4
Mar 27, 2026
Merged

feat: add ComfyUI-Manager v4 support and uv-compile unified dependency resolution#363
bigcat88 merged 1 commit intomainfrom
feat/support-manager-v4

Conversation

@ltdrdata
Copy link
Copy Markdown
Member

@ltdrdata ltdrdata commented Jan 28, 2026

Summary

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

Requires: ComfyUI-Manager >= 4.1b8 (via `manager_requirements.txt` in ComfyUI)

Breaking Changes

  • Remove `--manager-url` and `--manager-commit` options from `comfy install`.
    Manager v4 is installed as a pip package from `manager_requirements.txt`, not git-cloned. These flags controlled which git repo/commit to clone, so they no longer apply.
    • Migration path: Install with `--skip-manager`, then manually install a custom Manager wheel/editable package into the workspace venv:
      comfy install --skip-manager
      # Option A: install a custom fork in editable mode
      pip install -e /path/to/your-manager-fork
      # Option B: install a specific version from PyPI
      pip install comfyui-manager==4.1b8
    • Scripts or CI pipelines using these flags will get an "unknown option" error and must be updated.
  • `validate_comfyui_manager()` now uses `find_cm_cli()` (module import check) instead of git path check (`custom_nodes/ComfyUI-Manager/.git`).

Manager Subcommand Changes

Command Description
`comfy manager disable` Disable manager completely (no flags passed)
`comfy manager enable-gui` Enable manager with new GUI
`comfy manager disable-gui` Enable manager but disable GUI only
`comfy manager enable-legacy-gui` Enable manager with legacy GUI
`comfy manager migrate-legacy` Migrate git-cloned manager to pip package
`comfy manager uv-compile-default` Set default for --uv-compile flag

`--uv-compile` Unified Dependency Resolution

Adds `--uv-compile/--no-uv-compile` flag to 7 custom node commands for Manager v4.1+ unified dependency resolution via `uv pip compile`.

Commands with `--uv-compile`:
`install`, `reinstall`, `update`, `fix`, `restore-snapshot`, `restore-dependencies`, `install-deps`

Standalone command: `comfy node uv-sync` — batch-resolve all installed custom node dependencies.

Flag resolution priority: explicit flag -> config default (`comfy manager uv-compile-default`) -> disabled

Mutual exclusivity: `--uv-compile` cannot be used with `--fast-deps` or `--no-deps`.

Bug Fixes

  • `find_cm_cli()` now checks workspace Python first (not CLI interpreter) — fixes false positive when comfy-cli is installed globally but cm_cli is only in workspace venv
  • `migrate_legacy()` uses `resolve_workspace_python()` instead of `sys.executable` — installs into correct environment
  • `_get_manager_flags()` logs warning for unknown manager mode values
  • `execute_cm_cli()` captures stderr via PIPE with background drain thread — surfaces git_helper.py errors

Cache Management

`comfy node update-cache` — force-fetch remote data and populate local Manager cache (blocking).

E2E Test Infrastructure

  • `MANAGER_OVERRIDE` env var: test Manager branches without PyPI publish
  • `/test-manager` PR comment trigger workflow for on-demand Manager patch testing
  • Windows file lock retry (`_rmtree_retry`) for `.git/objects/pack/*` cleanup between tests

Test plan

  • 463 unit tests pass, 0 failures
  • 18/18 E2E tests pass on all platforms (Ubuntu, macOS, Windows)
  • Tested with Manager 4.1b8
  • Rebased on latest `main`
  • Windows git clone file lock issue resolved (ComfyUI-Manager 4.1b8 + `_rmtree_retry`)

Dependencies

This PR will work correctly once the following ComfyUI-side PR is merged, which updates `manager_requirements.txt` to require `comfyui-manager>=4.1b8`:

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Jan 28, 2026
@ltdrdata ltdrdata requested a review from bigcat88 January 28, 2026 17:34
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 92.73356% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
comfy_cli/command/install.py 70.00% 12 Missing ⚠️
comfy_cli/command/custom_nodes/command.py 97.46% 4 Missing ⚠️
comfy_cli/command/custom_nodes/cm_cli_util.py 94.33% 3 Missing ⚠️
comfy_cli/workspace_manager.py 86.66% 2 Missing ⚠️
@@            Coverage Diff             @@
##             main     #363      +/-   ##
==========================================
+ Coverage   67.04%   70.94%   +3.90%     
==========================================
  Files          33       33              
  Lines        3711     3931     +220     
==========================================
+ Hits         2488     2789     +301     
+ Misses       1223     1142      -81     
Files with missing lines Coverage Δ
comfy_cli/cmdline.py 58.00% <ø> (ø)
comfy_cli/command/launch.py 42.68% <100.00%> (+7.51%) ⬆️
comfy_cli/constants.py 100.00% <100.00%> (ø)
comfy_cli/workspace_manager.py 73.25% <86.66%> (+3.84%) ⬆️
comfy_cli/command/custom_nodes/cm_cli_util.py 95.41% <94.33%> (+4.78%) ⬆️
comfy_cli/command/custom_nodes/command.py 79.69% <97.46%> (+22.32%) ⬆️
comfy_cli/command/install.py 75.19% <70.00%> (+2.44%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ltdrdata ltdrdata force-pushed the feat/support-manager-v4 branch 3 times, most recently from c29f340 to b7d0a07 Compare January 28, 2026 17:45
@bigcat88
Copy link
Copy Markdown
Contributor

@ltdrdata hello! is this PR is ready to be reviewed? (sorry, I completely forgot about this PR)

@ltdrdata
Copy link
Copy Markdown
Member Author

Oh… additional updates to support uv-compile are currently in progress. Since the changes are fairly extensive, I’m also validating them more thoroughly. Please wait a bit longer.

@ltdrdata ltdrdata force-pushed the feat/support-manager-v4 branch from e8a78ce to a4212d6 Compare March 14, 2026 04:06
@ltdrdata ltdrdata force-pushed the feat/support-manager-v4 branch from 8b55247 to 73e3aea Compare March 14, 2026 10:15
@ltdrdata ltdrdata changed the title feat(manager): add ComfyUI-Manager v4 support feat: add ComfyUI-Manager v4 support and uv-compile unified dependency resolution Mar 14, 2026
@ltdrdata ltdrdata force-pushed the feat/support-manager-v4 branch from 73e3aea to a655999 Compare March 15, 2026 01:14
@ltdrdata
Copy link
Copy Markdown
Member Author

For the E2E tests to function correctly, the update-cache feature introduced in 4.1b5 is required, so the following PR needs to be merged.

Comfy-Org/ComfyUI#12957

@bigcat88
Copy link
Copy Markdown
Contributor

@ltdrdata can you rebase this PR on main branch?

@ltdrdata ltdrdata force-pushed the feat/support-manager-v4 branch from a655999 to f364014 Compare March 17, 2026 15:29
@ltdrdata
Copy link
Copy Markdown
Member Author

To resolve the E2E test failures in the Windows environment, it needs to be updated to manager v4.1b6.

Comfy-Org/ComfyUI#13022

@ltdrdata ltdrdata marked this pull request as draft March 21, 2026 00:28
@ltdrdata ltdrdata force-pushed the feat/support-manager-v4 branch 8 times, most recently from c2f8a34 to 1ea21a5 Compare March 22, 2026 01:13
… resolution

Manager v4 is now installed as a pip package (via manager_requirements.txt)
rather than being git-cloned into custom_nodes/.

Breaking changes:
- Remove --manager-url and --manager-commit options from comfy install.
  Users who need a custom Manager should use --skip-manager and install
  their own wheel into the workspace venv.

New features:
- Manager GUI mode system (disable, enable-gui, disable-gui, enable-legacy-gui)
- --uv-compile/--no-uv-compile flag on 7 node commands for unified dep resolution
- comfy node uv-sync standalone command
- comfy manager uv-compile-default config command
- comfy manager migrate-legacy for git-to-pip migration
- comfy node update-cache command
- Windows pipe deadlock fix (stderr background drain thread)

Tests:
- Comprehensive unit tests for cm_cli_util, Manager GUI, node commands
- E2E tests for uv-compile with conflict detection packs
@ltdrdata ltdrdata force-pushed the feat/support-manager-v4 branch from 767a226 to 82e6744 Compare March 24, 2026 11:19
@ltdrdata ltdrdata marked this pull request as ready for review March 24, 2026 13:19
Copy link
Copy Markdown
Contributor

@bigcat88 bigcat88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 26, 2026
@bigcat88 bigcat88 merged commit 0cb2cb8 into main Mar 27, 2026
14 checks passed
@bigcat88 bigcat88 deleted the feat/support-manager-v4 branch March 27, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants