Skip to content

feat(manager): add ComfyUI-Manager v4 support #363

Open
ltdrdata wants to merge 3 commits intomainfrom
feat/support-manager-v4
Open

feat(manager): add ComfyUI-Manager v4 support #363
ltdrdata wants to merge 3 commits intomainfrom
feat/support-manager-v4

Conversation

@ltdrdata
Copy link
Member

Summary

ComfyUI-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 install command
  • validate_comfyui_manager() now uses find_cm_cli() instead of git path check

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

Implementation Details

  • find_cm_cli() uses importlib.util.find_spec("cm_cli") with @lru_cache
  • execute_cm_cli() uses module-based execution (python -m cm_cli)
  • _get_manager_flags() injects --enable-manager flags based on config mode
  • Launch automatically detects cm-cli availability and skips manager flags if unavailable

Reference: Comfy-Org/ComfyUI#12140

@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

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 19 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 95.53% 5 Missing ⚠️
comfy_cli/command/custom_nodes/cm_cli_util.py 71.42% 2 Missing ⚠️
@@            Coverage Diff             @@
##             main     #363      +/-   ##
==========================================
+ Coverage   52.48%   56.12%   +3.64%     
==========================================
  Files          32       32              
  Lines        3563     3720     +157     
==========================================
+ Hits         1870     2088     +218     
+ Misses       1693     1632      -61     
Files with missing lines Coverage Δ
comfy_cli/cmdline.py 49.39% <ø> (ø)
comfy_cli/command/launch.py 35.26% <100.00%> (+19.87%) ⬆️
comfy_cli/constants.py 100.00% <100.00%> (ø)
comfy_cli/workspace_manager.py 69.82% <100.00%> (+6.24%) ⬆️
comfy_cli/command/custom_nodes/cm_cli_util.py 29.50% <71.42%> (+6.70%) ⬆️
comfy_cli/command/custom_nodes/command.py 56.21% <95.53%> (+13.01%) ⬆️
comfy_cli/command/install.py 69.90% <70.00%> (+7.99%) ⬆️
🚀 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 2 times, most recently from 88530dc to c29f340 Compare January 28, 2026 17:43
ComfyUI-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 install command
- validate_comfyui_manager() now uses find_cm_cli() instead of git path check

Manager Subcommand Changes:
- Add 'disable' command: disable manager completely (no flags passed)
- Add 'enable-gui' command: enable manager with new GUI
- Add 'disable-gui' command: enable manager but disable GUI only
- Add 'enable-legacy-gui' command: enable manager with legacy GUI
- Add 'migrate-legacy' command: migrate git-cloned manager to pip package

Implementation:
- find_cm_cli() uses importlib.util.find_spec("cm_cli") with @lru_cache
- execute_cm_cli() uses module-based execution (python -m cm_cli)
- _get_manager_flags() injects flags based on config mode
- Add 34 tests covering manager v4 scenarios
@ltdrdata ltdrdata force-pushed the feat/support-manager-v4 branch from c29f340 to b7d0a07 Compare January 28, 2026 17:45
…idation

- Add TestFillPrintTable covering all GUI mode states and backward compatibility
- Add TestFindCmCli for cm_cli module detection and caching behavior
- Add TestPipInstallManagerEdgeCases for missing requirements file
- Add TestValidateComfyuiManager for cm-cli validation flow
- Fix string/boolean comparison in _get_manager_flags() and fill_print_table()
- Support "false", "0", "off" and "true", "1", "on" variations
- Add stderr capture and output for pip install failures
- Add tests for boolean backward compatibility
- Improve test assertions for cache_clear and subprocess commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant