Nodes/ComfyUI CoolB Nodes/CB Set Mute/Bypass State ⚡️
ComfyUI Node

CB Set Mute/Bypass State ⚡️

Flip nodes off from inside a running graph

By CoolBreeze164·Created 29 days ago·Updated 21 days ago· 2
CB Set Mute/Bypass State ⚡️
  • signal
  • signal
◄node_ids1, 2►
◄modeMute►

What it does

You hand it a list of node IDs, a mode, and any wire at all as a trigger, and it sets those nodes to Mute, Bypass, or Active. The state change lands on the next run, not the current one - the graph you just queued was already serialised and sent to the backend, so there's nothing left to change about it. The README says this flatly and it's the single most important thing to understand about the node.

That "next run only" behaviour is a feature once you stop fighting it. It means you can run a workflow twice in a row with different parts switched on, chaining queues, and each run only loads what it needs. In practice that's how people stop a big graph from OOMing: one user working through four models in sequence landed on exactly this pattern - set the mute states for the next stage, then have a queue-trigger re-queue the workflow so the previous stage's models are fully unloaded before the next loads.

How it works

Backend side, node_ids is a string that gets split on commas and whitespace, and each token is checked with isdigit() - anything non-numeric is dropped without complaint. The surviving IDs are sent to the frontend over ComfyUI's custom event channel (PromptServer.send_sync), and a small JS extension in the pack listens for it and sets node.mode on the matching live nodes: Mute becomes 2, Bypass becomes 4, Active becomes 0.

That's LiteGraph's own node mode enum, which is why the states behave the way you expect on canvas: muting removes the node from execution entirely, bypassing keeps the wiring alive and passes through where a pass-through makes sense. signal is typed * - the wildcard - so you can hang this off any connection that represents "this branch ran", and it comes back out of the signal output unchanged for stacking several of these in a row.

One consequence of the JS route: this is a canvas change. It edits the workflow in your browser tab. If you then save the workflow, the new states are what get saved; if you reload without saving, you're back where you started. That's also why the IDs matter so much - they're the numeric badges in the live graph.

Inputs and outputs

| | | |---|---| | signal (*, required) | any connection; its arrival is the trigger, and it passes through | | node_ids (STRING, default 1, 2) | the node IDs to change, comma or space separated | | mode (enum: Mute, Bypass, Active) | what to set them to | | signal (output, *) | the same signal, so you can chain another state-setter |

Installing it

Manager → Custom Nodes Manager → search ComfyUI CoolB Nodes → Install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/CoolBreeze164/ComfyUI-CoolB-Nodes

Nothing to download, but hard-refresh the browser tab - the actual state change comes from a JavaScript file the pack serves, and a cached frontend bundle is the usual reason a freshly installed node does nothing visible.

Common issues

Nothing gets muted. Work through it in order: is the frontend script loaded (refresh hard, check the console)? Are the IDs the live node IDs? Copying nodes, pasting a workflow, or importing someone else's JSON renumbers things, and an ID that pointed at your sampler last week can point at nothing - or at something else - today. And remember the change applies to the next run, so a single queue won't show you anything.

It muted the wrong node. Non-numeric junk in node_ids is skipped silently, which means a typo like 12a quietly becomes nothing while 12 stays in the list. Double-check the badge number on canvas rather than trusting your memory of the workflow.

It fires every run. It's declared an output node, so ComfyUI always runs it. If you want it to fire conditionally, the condition lives upstream - the signal input is what makes it meaningful, so wire it from the branch you actually want to gate.

Muting something broke the chain. If you mute a node that sits upstream of the signal that triggers the next state change, the chain stops and the workflow stays in whatever state it reached. That's how people accidentally freeze a workflow in stage two forever. Keep trigger paths outside the regions you're switching.

Frontend caveats. This style of node - backend event plus a JS handler that pokes at app.graph internals - is the same architecture as rgthree's muters and bypassers, and that family is what ComfyUI's Nodes 2.0 frontend rewrite broke, with compatibility still partial long after. If the canvas stops listening, check whether Nodes 2.0 is on; the legacy canvas is the standing workaround in this ecosystem.

CategoryCoolB Nodes ⚡️

Inputs (3)

NameTypeDefaultDescription
signal*—
node_idsSTRING1, 2—
modeCOMBOMute3 options: Mute, Bypass, Active

Outputs (1)

NameTypeDescription
signal*—