Image Output Switch (Boolean)
Route it with a checkbox
- images
- images_true
- images_false
ImageOutputSwitch (shown in the menu as "Image Output Switch (Boolean)") is the mirror image of its sibling in the same pack. The input switch takes two images and picks one; this takes one image and sends it down one of two wires, decided by a boolean. Same idea, flipped: image_true and image_false become outputs, and the condition checkbox chooses which one gets the goods.
Mechanically it's three lines. If the condition is true it returns (images, None) - your image on images_true, and None on images_false. If false, the exact mirror: (None, images) on images_false. Nothing is copied, nothing is transformed; it's pure routing. The inputs that matter are just two: images (the IMAGE to route) and condition (a BOOLEAN checkbox, or a boolean wire from a comparison node). The two outputs are images_true and images_false.
Where this earns a place in a graph: you have one image and two possible destinies, and a condition picks between them. The classic example is A/B routing for post-processing - if the condition says "yes," the frame goes to a detail pass or an upscaler; otherwise it flows straight to save. You can also build a poor man's comparison rig: route the same image to two different upscalers, then compare the results side by side. It's the kind of node you reach for when a workflow keeps growing conditionals and you'd rather see the branch on the canvas than buried in a Primitive node's settings.
One honest warning, same as the input version: the inactive leg outputs None, and ComfyUI will happily deliver that None to whatever node hangs off that wire. Whether that's harmless depends entirely on the downstream node - many tolerate it, some error on it. When in doubt, only wire up the branch you're actually using, or make sure the thing on the dead leg can eat a None.
Installation is shared with the rest of the pack, and it's the rare custom-node install with no steps after the clone. In ComfyUI Manager, search "ComfyUI-DeanLogic" and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/MartinDeanMoriarty/ComfyUI-DeanLogic
Restart ComfyUI and all four nodes appear under the "DeanLogic" category. No requirements.txt, no pip, no model downloads - the pack is a few hundred lines of pure Python, MIT licensed, from a single commit in mid-2025.
Last note, because it's the thing that'll confuse you if you hit it: unlike its sibling ImageInputSwitch in this same pack, this node actually works as shipped. The input switch currently crashes on a FUNCTION/method name mismatch until you patch one line. So if a workflow uses both and the output switch hums along while the input switch dies, now you know why - and you can stop suspecting your own wiring.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| condition | BOOLEAN | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images_true | IMAGE | — |
| images_false | IMAGE | — |