Boolean Switch
A boolean switch that skips the branch you don't need
- on_true
- on_false
- output
The Switchboard Boolean Switch is the node you drop in when one toggle needs to pick between two entirely different things - two images, two latents, two samplers, even two models - and the thing you don't pick shouldn't cost you anything. It's a ternary operator for the graph: boolean True routes on_true to the output, False routes on_false. Simple enough that it sounds boring. The part that isn't boring is the "lazy" bit, and it's the whole reason to reach for this node over a generic switch.
Most switch nodes evaluate both branches and throw one away. This one never executes the losing branch at all. The source tells ComfyUI exactly which lazy input it needs (check_lazy_status returns ["on_true"] or ["on_false"] depending on the boolean), so the entire upstream chain of the unused input is skipped for that run. That matters when one branch loads a model and the other doesn't: the branch you didn't pick never touches VRAM, never runs a sampler, might as well not exist. If you've built a workflow with a hires pass and a plain pass behind one toggle, this is the switch you want - the idle branch is free.
The three inputs, and the one that trips people up:
boolean- the only required input, and it's a socket, not a widget. There is deliberately no toggle on the node; you wire aBOOLEANin. That's a design choice, straight from the README: a switch driven by a hidden widget is easy to misread. Beginners coming from other switch packs expect a clicky toggle and get confused - wire it and move on.on_true/on_false- both*(any type): images, latents, conditioning, models, strings, whatever. You can leave one empty; it just passesNonewhen selected.
One output, output, also * - it carries whatever type the selected branch had, so it plugs straight into the socket you aimed it at.
Now the pack context, because it explains why this node exists. ComfyUI-Switchboard is a small single-author pack whose headline acts are the Group and Node Controllers - a more flexible take on rgthree's Fast Group Bypasser that lets you flip whole sections of a graph from a wired boolean. This node and its sibling Value on Boolean ship alongside so you can build a conditional pipeline without pulling in another pack just to get a switch. That's genuinely the niche: the controllers are browser-side, these two are real executing backend nodes, and together they turn a few inputs into a full gate.
Install
ComfyUI Manager, search ComfyUI-Switchboard, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Oratorian/ComfyUI-Switchboard
Then restart ComfyUI and hard-reload the browser (Ctrl/Cmd+Shift+R). Unlike the pack's Controllers, which are front-end only, this is a backend Python node - a server restart is required, not just a refresh. No external Python dependencies (no requirements.txt in the repo), no model downloads. Everything lands under the 🎛️ Switchboard category in the Add-Node menu.
Troubleshooting
- "There's no way to set it!" - that's the design. The
booleaninput needs a wire. Chain it from a Boolean node, or from thebooleanoutput of Switchboard's Value on Boolean. - "The branch I expected to run didn't do anything." - you've discovered lazy evaluation. The skipped branch truly doesn't execute, so no side effects from it either. If you wanted something in the unused branch to "happen anyway," you need it outside the switch.
- Nodes 2.0 worry? Doesn't apply here. The Vue renderer drama hit the pack's client-side Controllers; this node is an ordinary backend node and is unaffected.
One thing this switch gets right that the pack's Controllers can't: the boolean is read at runtime, so it sees the actual value at queue time, not a browser-side guess. Wire a computed boolean in and it just works.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean | BOOLEAN | — | |
| on_trueopt | * | — | |
| on_falseopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |