Nodes/ComfyUI Ino Nodes/Ino Switch On Bool
ComfyUI Node

Ino Switch On Bool

A boolean switch that only runs the branch you actually pick

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Switch On Bool
  • on_false
  • on_true
  • output
switch

Every workflow eventually needs an if/else. Ino Switch On Bool is a clean, typed version of that: feed it a boolean and two values, get the selected one out. on_true if the switch is on, on_false if it's off. The output is a match-type wire - both inputs must be the same type - which means it works for strings, models, latents, conditioning, anything. That's the headline feature: one switch that doesn't care what it's routing.

But the part that makes it worth reaching for over a grab-bag router is lazy evaluation. The node only requests the branch it actually needs. If switch is true, the on_false input is never computed by the upstream nodes; if false, on_true isn't. That's a big deal in ComfyUI, where "not running a node" can mean the difference between a fast workflow and one that wastes a full sampling pass on a branch you're not even using.

Why lazy matters in practice

Two scenarios where this saves you:

  • A/B toggles with expensive branches. Two samplers, one switch, you're comparing outputs. Without lazy evaluation, both would run every time. With it, only the selected one does.
  • Branches that would error if forced. If one input isn't connected and the switch doesn't need it, nothing breaks. A non-lazy switch would choke on the missing input even when you never wanted that branch.

The inputs are switch (BOOLEAN), on_false, and on_true; the output is output, all match-typed. There's no enabled toggle and no config - set the boolean (or wire it from another node, like InoStringContains or a compare node) and go.

This is the good version of a genre with a bad reputation. The community has pushed back hard on "anything anywhere" routing nodes that let you connect any output to any input - they make workflows impossible to debug. This switch deliberately does not do that: it's typed, it's explicit, and it's lazy. That's the difference between a tool and a trap.

Installing Ino Nodes

Ships inside the Ino pack. ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart. Terminal:

cd ComfyUI/custom_nodes
git clone https://github.com/nobandegani/ComfyUI-InoNodes.git
cd comfyui_ino_nodes
pip install -r requirements.txt

Needs inopyutils in ComfyUI's Python environment; the pack is V3-schema, so keep ComfyUI reasonably current.

Where people get burned

The match-type constraint trips people first: you can't route a string on one side and an image on the other - both inputs must be the same type. That's the design doing its job. Also note the node is marked experimental in the pack; it's stable in practice, but if you're building a workflow you'll share with strangers, that's a small flag to know about.

CategoryInoExtraNodes

Inputs (3)

NameTypeDefaultDescription
switchBOOLEAN
on_falseCOMFY_MATCHTYPE_V3
on_trueCOMFY_MATCHTYPE_V3

Outputs (1)

NameTypeDescription
outputCOMFY_MATCHTYPE_V3