Nodes/ComfyUI Orchestration Toolkit/Node State Controller
ComfyUI Node

Node State Controller

Batch mute and bypass nodes from one box

By flows-and-frames·Created 7 months ago·Updated 8 days ago· 0
Node State Controller

      Every ComfyUI workflow reaches the point where you're muting the same handful of nodes over and over - the ControlNet you're not using this pass, the face detailer you want to skip, the upscaler you'll turn back on when the base image is right. The default way to do that is right-click, Mute, right-click, Bypass, one node at a time, for the entire run. Node State Controller is the answer to that specific irritation: you tell it once which nodes to control and what to do to them, then flip them all with a single button - or a keyboard shortcut you press from anywhere in the UI.

      It's a node with a lie in its shape: it has no inputs and no outputs. Zero sockets, nothing to wire, and that's the point. It never touches your data flow. It's a remote control that reaches into the graph and changes other nodes' state for you, without adding a single connection to the canvas.

      How it works

      All the real work happens in JavaScript, not Python - the backend class is an empty noop. The controller keeps a list of rows, each with three things: a target node, an action, and a label. You build the list with the Capture Target button: click it, then click the nodes on the canvas you want to control. Each click adds a row.

      Here's the clever bit: instead of remembering targets by their title (titles change constantly and nothing stops two nodes sharing one), it stamps a hidden unique key onto each captured node's properties and tracks it by that. That key survives renames, which is why the controller keeps working after you retitle half the graph.

      Each row has one of four actions:

      • Mute - the node is skipped entirely, its outputs go missing
      • Unmute - back to normal
      • Bypass - the node is skipped but acts as pass-through, so its outputs equal its inputs
      • Unbypass - back to normal

      You can apply all rows with the APPLY button, or capture a global shortcut (button labeled Capture Shortcut, then press the combo) and trigger everything with that key from anywhere. The shortcut is normalized the way you'd hope - ctrl+shift+k, Ctrl+Alt+1, F5 all work - and if two controllers claim the same shortcut you get a warning and neither fires, so you can't build a silent conflict.

      Mechanically it's just setting each target's node mode, the same thing the right-click menu does - it's the "right-click Mute" action, batched and hotkey-able. The state persists when you save the workflow, exactly like manual muting.

      Where it fits

      If you're a heavy rgthree user, you already have Fast Groups Muter and Bypasser, which mute whole canvas regions at once. That's the group-level tool. This is the per-node tool for when the nodes you're toggling don't happen to live in one group - and it adds the global hotkey, which neither rgthree nor stock ComfyUI gives you for individual nodes. For a workflow with a few optional branches you flip during a test run, it's genuinely the faster path.

      Installing it

      It ships in the ComfyUI-Orchestration-Toolkit pack, installable from ComfyUI Manager (search "ComfyUI-Orchestration-Toolkit") or by hand:

      cd ComfyUI/custom_nodes
      git clone https://github.com/flows-and-frames/ComfyUI-Orchestration-Toolkit.git
      

      Then restart ComfyUI. There are no Python dependencies and no model downloads - the whole pack is a Python shim plus a JS file. It can't break your environment, which is more than most custom nodes can claim.

      Common issues

      • "Why does nothing connect to it?" Because it's a control node, not a data node. It never wires into the graph - that's its design, not a bug.
      • It's a frontend-patching node. It hooks global key events and patches the canvas mouse handler, the exact class of node that ComfyUI's Nodes 2.0 frontend rewrite has historically broken (the same rewrite that famously broke rgthree's rendering). If you've switched to Nodes 2.0 and this misbehaves, the standing community workaround is to leave it off - and this pack is a candidate to fall over there.
      • Duplicating nodes confuses it. Copy a controller along with its targets and the duplicates can end up sharing target keys. The author built in a guard: it detects the duplicates, warns you, and skips the action rather than muting the wrong node. If you see that alert, that's what happened - remove or recapture the rows.
      • The shortcut is global. It fires even when your browser focus is elsewhere in the UI (though not while you're typing in a text field). Pick something you won't mash accidentally.
      Categoryprompt_orchestration

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs