Nodes/Tojioo Passthrough/Any Bool Switch
ComfyUI Node

Any Bool Switch

A boolean switch with no selector to fiddle with

By Tojioo·Created 11 months ago·Updated 7 months ago· 13
Any Bool Switch
    • boolean
    boolean_1

    Any Bool Switch is a switch node with no switch. Instead of an A/B toggle you point at one of two inputs, it looks at its BOOLEAN inputs, picks the first one that's actually connected, and sends it to the boolean output. No selector widget, nothing to misconfigure - the wiring is the decision.

    This is the "fallback switch" shape the community knows from rgthree's Any Switch: whichever live branch wins, and you never touch a selector. Tojioo's version is typed instead of a wildcard * socket - you get a different node per type, and this one only accepts booleans, which trades flexibility for zero chance of plugging the wrong type in.

    How it works

    Slots appear as you wire them - start with boolean_1, connect a second source and a boolean_2 slot grows. On each run the node collects whatever inputs aren't None and returns the lowest-numbered slot that's connected. Two details make this behave the way you want: it ignores any input whose value is None, which is exactly what a muted or bypassed upstream node produces, and it raises an error if nothing is connected rather than silently outputting nothing.

    So "first connected" really means "first connected and live". Wire a toggle into boolean_1, a fallback into boolean_2, mute the first branch, and the second wins without you touching anything.

    Where you'd use it

    • A "use this if present, otherwise that" pattern for toggles feeding a branch.
    • Multiple alternative sources of a boolean where only one should be live per run.
    • Fallback ordering: put your preferred source in the lowest slot.

    Install

    ComfyUI Manager → search "Tojioo Passthrough" → install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Tojioo/tojioo_passthrough.git
    

    Restart ComfyUI. The pack has no pip dependencies, model downloads, or requirements.txt to fight with - pure Python plus a bundled frontend, and it's on the Comfy Registry under publisher tojioo.

    Common issues

    Two things trip people up. First: slot order, not connection time, decides the winner - a live boolean_1 always beats boolean_2, even if you added boolean_2 after. If the "wrong" input is winning, the earlier slot is probably muted, bypassed, or actually unconnected. Second: leave every input unwired and the node throws a "no inputs connected" error that shows up red on the canvas. Connect at least one slot. Those are the only real failure modes - the node's own dynamic slot handling was a focus of the pack's 2026 test work, so wiring-edge bugs are rare.

    CategoryTojioo Passthrough/Dynamic Nodes/Switch Nodes

    Inputs (1)

    NameTypeDefaultDescription
    boolean_1optBOOLEAN

    Outputs (1)

    NameTypeDescription
    booleanBOOLEAN