ComfyUI_Custom_Switch

ComfyUI_Custom_Switch
★ 7

分组管理自动识别标签动态生成开关免连线切换
通过在节点标题中添加标签,无需连线即可一键绕过/启用整组节点,支持多组管理与独占开关。
💡 在复杂流程中用标题标签一键切换子节点组
🍴 3 Forks💻 JavaScript🔄 2025-10-12
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/f414772aa5c3
📄 README

https://github.com/user-attachments/assets/083e1c06-8dad-4f6e-823f-22330355a6ff

https://github.com/user-attachments/assets/012d1f26-b2ea-481e-9b9a-8b65504409a6

https://github.com/user-attachments/assets/a5f4c5e7-eb4b-47db-b791-daf6755518b0

🧑‍指揮 Orchestrator Node (Multi-Group & Auto-Discovery) for ComfyUI

An advanced, “zero-configuration” custom node for ComfyUI, designed to manage complex and modular workflows.

This node scans your graph for specific tags in the [[GROUP:TAG]] format and dynamically builds a control interface. It allows for the use of multiple independent Orchestrator nodes within the same workflow, each managing its own group of nodes, making it ideal for complex setups.


\#\# ✨ Features

  • Multi-Group Management: Use multiple Orchestrator nodes, each controlling a subset of your workflow via a unique Group ID.
  • Automatic Discovery: Automatically detects tags belonging to its group without any manual configuration.
  • Dynamic Interface: Creates toggle switches on the fly for each tag detected within its group.
  • Exclusive Control: Only one toggle can be active at a time within a single group.
  • Common Nodes Ignored: Untagged nodes always remain active.

  • \#\# 🚀 Usage

    Operation is based entirely on how you name your nodes.

    Step 1: Add an Orchestrator Node and Set Its Group

  • Add the Logic > Orchestrator (Auto-Discovery) node to your graph.
  • In the node’s group_id field, enter a unique name for the group you want to control. For example: MODELS.
  • Step 2: Tag Your Target Nodes

    Use a double-bracket syntax [[GROUP_ID:TAG_NAME]] in the titles of the nodes you want to control.

  • Example for the MODELS group:
  • Rename a KSampler to [[MODELS:SDXL]] KSampler.
  • Rename another KSampler to [[MODELS:PONY]] KSampler.
  • Step 3: The Node Updates

    After tagging your nodes, the Orchestrator node with the ID MODELS will scan the graph, find the SDXL and PONY tags belonging to its group, and create the corresponding toggle switches.

    Multi-Group Usage

    You can repeat the process to manage other parts of your workflow independently.

  • Add a second Orchestrator node.
  • Give it a different group_id, for example, STYLES.
  • Tag other nodes accordingly: [[STYLES:Cinematic]], [[STYLES:Anime]].
  • The second node will create the Cinematic and Anime toggles and will only control those nodes, never interfering with the MODELS group.


    \#\# How It Works

    On load, each Orchestrator node reads its own Group ID. It then iterates through all other nodes in the graph, looking for tags in the [[GROUP:TAG]] format. If a tag’s GROUP matches the node’s Group ID, it adds the TAG to its list of options and builds its UI accordingly. This ensures that each Orchestrator only manages the nodes explicitly assigned to it.