π Boolean Switch
A Toggle That Switches Anything, Not Just Numbers
- road_A
- road_B
- boolean
- selected_item
The simplest useful node in the Orion4D_MetaNode pack, and the one you'll reach for more than you expect. π Boolean Switch is an A/B switch: one boolean toggle, two any-type inputs, and it passes whichever side the toggle points at. That's the whole node - but the "any-type" part is the trick, because it's not just numbers.
How it works. You have toggle (default off), and two optional inputs, road_A and road_B, both typed * - ComfyUI's wildcard. The node reads the toggle and returns road_B if it's on, otherwise road_A. Because the inputs are wildcards, the same node switches images, latents, strings, models, conditioning - anything. Nothing in ComfyUI's core does this for arbitrary types out of the box; that's the A/B switch shape from the plumbing layer, minus the type restriction.
The two outputs matter more than you'd think. boolean is the raw toggle value (a real BOOLEAN), and selected_item is the value you picked. The boolean output is the hidden gem: the pack's README specifically points out that it plugs straight into the π¦ Execution Gate. Wire this switch's boolean into a gate's continue and you've got a live on/off valve for a whole branch - the most common reason people install a switch pack in the first place.
Where people get burned: road_A and road_B are optional and unconnected-by-default, so an unwired switch silently passes nothing. If you flip the toggle and a branch goes dead, check that both sides are actually connected. Also worth knowing: when both roads are connected and the toggle is off, selected_item is exactly road_A - there's no "neither" state, no first-non-null fallback. It's a manual routing valve, not an autopilot.
Install. ComfyUI Manager β search "Orion4D_MetaNode", or:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/Orion4D_MetaNode
Restart ComfyUI; find it under Orion4D_MetaNode/UI Widgets. No extra dependencies - this one's pure Python.
It's a boring node that quietly fixes a real annoyance: keeping two model loaders or two prompt branches in one workflow and flipping between them without rewiring. Once you've used it for that, you'll spot the dozen other places it belongs.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| toggle | BOOLEAN | false | β |
| road_Aopt | * | β | |
| road_Bopt | * | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| boolean | BOOLEAN | β |
| selected_item | * | β |