Files
ltdrdata-ComfyUI-Manager/comfyui_manager
Dr.Lt.Data b76eb11207 v4: Enable a disabled node pack requested through cm-api before restarting (#3526)
When an extension asks through cm.try-install-custom-node for a node
pack that is disabled, the legacy UI asks whether to enable it and
restart. On confirmation it posted to /v2/customnode/toggle_active,
which neither server has, did not look at the answer, and restarted:
ComfyUI came back with the pack still disabled.

- Enable the pack as the Enable button of the Custom Nodes Manager
  does: find its row in /v2/customnode/getlist, post it to
  /v2/manager/queue/batch, and wait for the queue to report the batch
- Restart only when the queue reports success; otherwise show why the
  pack was not enabled
- Leave a queue that is running alone, and tell the user to try again
- End the wait after a minute, or when the queue finishes without the
  batch; left waiting, the handler would restart ComfyUI on a report
  that arrives much later
- Do not restart while other work is queued behind the pack; ask the
  user to restart after it
- Report a request that gets no answer while the pack is being
  enabled; "Enabling..." stayed on screen
- Show "Rebooting..." when the restart request gets no answer, which
  is what happens when ComfyUI restarts; the rejected request ended
  the handler
- Report a restart that is refused at the current security level:
  show_message was not imported, so nothing was shown
- Remove the branch for a pack that is not installed: the server does
  not send this request for one, and the route it posted to is gone
- Leave the queue listener of the Manager menu while the menu has not
  been created; a queue started from here made it raise
- Add browser tests of the handler and of that listener, and a
  CHANGELOG entry

Found while reviewing #3435.

The same change for main is #3525.
2026-11-14 23:41:26 +09:00
..
2025-09-03 01:24:47 +09:00
2025-06-01 06:23:11 +09:00

ComfyUI-Manager: Core Backend (glob)

This directory contains the Python backend modules that power ComfyUI-Manager, handling the core functionality of node management, downloading, security, and server operations.

Directory Structure

  • glob/ - code for new cacheless ComfyUI-Manager
  • legacy/ - code for legacy ComfyUI-Manager

Core Modules

  • manager_core.py: The central implementation of management functions, handling configuration, installation, updates, and node management.
  • manager_server.py: Implements server functionality and API endpoints for the web interface to interact with the backend.

Specialized Modules

  • share_3rdparty.py: Manages integration with third-party sharing platforms.

Architecture

The backend follows a modular design pattern with clear separation of concerns:

  1. Core Layer: Manager modules provide the primary API and business logic
  2. Utility Layer: Helper modules provide specialized functionality
  3. Integration Layer: Modules that connect to external systems

Security Model

The system implements a comprehensive security framework with multiple levels:

  • Block: Highest security - blocks most remote operations
  • High: Allows only specific trusted operations
  • Middle: Standard security for most users
  • Normal-: More permissive for advanced users
  • Weak: Lowest security for development environments

Implementation Details

  • The backend is designed to work seamlessly with ComfyUI
  • Asynchronous task queuing is implemented for background operations
  • The system supports multiple installation modes
  • Error handling and risk assessment are integrated throughout the codebase

API Integration

The backend exposes a REST API via manager_server.py that enables:

  • Custom node management (install, update, disable, remove)
  • Model downloading and organization
  • System configuration
  • Snapshot management
  • Workflow component handling