🚧 Blocker
The kill-switch your workflow graph has been missing
- any
- any
ComfyUI gives you bypass and mute per node, but sometimes you want to switch an entire branch of the graph on or off from a single boolean - without right-clicking around or rebuilding anything. That's exactly what the 🚧 Blocker does. It sits on a wire, and one checkbox decides whether the data flows or the branch quietly goes dark.
Here's the mental model: think of it as a valve, not a filter. When enable is on, whatever you feed in comes out the other side byte-for-byte identical. When it's off, the node fires anyway but emits a special "blocked" signal that tells ComfyUI's executor to skip everything downstream of it. In the source this is ExecutionBlocker from comfy_execution.graph_utils - the same mechanism a few other logic packs use to mute a branch from inside the data instead of from the canvas. The node even recolors itself (green = pass, red = block) so you can see the state at a glance without squinting at the toggle.
The inputs and outputs are about as minimal as a node gets. There are exactly two inputs: any (the wildcard * socket - plug in an IMAGE, a latent, a string, a model, whatever, it doesn't care) and enable, a BOOLEAN switch that defaults to true. One output, also any, carries the value through. That wildcard behavior is what makes the node work at all: ComfyUI's * type accepts any socket, which is the whole basis of every switch and routing node in this pack (and in rgthree, and cubiq's Essentials).
Why would you reach for it instead of just bypassing a node? Because the switch can be wired. Convert the enable widget to an input and you can drive it from a Judge, a random boolean, or a control panel node - that turns "I toggle this branch by hand" into "this branch turns itself off when a condition is met." It's the building block for if/else graphs, A/B model testers, and "only run the upscaler on portrait images" style setups.
A couple of things to know before you wire one in. First, this node always re-executes (it returns float("NaN") from IS_CHANGED, the standard trick that defeats ComfyUI's cache), so blocking and unblocking take effect immediately instead of on the next manual run. The flip side of that coin: an always-dirty node sitting mid-graph makes everything upstream of it re-run every time, which is a real slowdown if you park one on a heavy loader. Second, when it blocks, downstream nodes don't run - but anything they saved last run (a cached preview, an image file) stays exactly where it was, which confuses people into thinking the block failed. Check the node color: red means it did its job.
Install it as part of the pack. In ComfyUI Manager, search "ComfyUI-Logic-nodes" and install; or:
cd ComfyUI/custom_nodes
git clone https://github.com/playboy-dongan/ComfyUI-Logic-nodes
then restart ComfyUI. No models to download, no extra Python deps for this node. One quirk: the README's clone command shows a slightly shorter repo name (ComfyUI-Logic); if that 404s, use the full -nodes URL above - that's the repo that actually ships these nodes.
It's a small node, and it's one of the ones you won't notice you needed until you've spent an afternoon rerunning the same 40-node graph with one branch bypassed. Add it to the toolbox next to Judge and Switch and you've got the start of a real control-flow toolkit.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| any | * | — | |
| enable | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| any | * | — |