Nodes/ComfyUI-Basic-Math/Boolean | Basic
ComfyUI Node

Boolean | Basic

A true/false switch you can wire anywhere

By akatz-ai·Created about a year ago·Updated 11 months ago· 16
Boolean | Basic
    • BOOLEAN
    valuefalse

    BooleanInput ("Boolean | Basic") is the simplest possible thing in this pack: one checkbox, one BOOLEAN output. You flip it true or false, and that value flows out the wire. There's no computation, no conversion, no cleverness - which is exactly why it belongs in a toolkit alongside the math nodes.

    The single input is value, a BOOLEAN with a default of false. The output is BOOLEAN. That's the whole node.

    Why you'd reach for it

    In a graph, booleans usually come out of comparisons - FloatComparison, NumberInRange, StringComparison. But sometimes you just need a manual on/off switch: "apply the second pass," "use the fast model," "flip the invert." You could set a widget directly on a node that happens to have one, but if the same flag drives several branches, a single BooleanInput wired to all of them means one checkbox controls the whole behavior.

    It also pairs with this pack's BooleanLogic node: wire a couple of these constants in as defaults while you're prototyping logic, then replace them with real comparison outputs later. It's the cleanest way to test a conditional path without waiting for the conditions to occur naturally.

    Installing it

    Same pack, same install - this is one of 23 nodes in akatz-ai's Basic Math pack, and it's pure Python with no dependencies or model files:

    cd ComfyUI/custom_nodes
    git clone https://github.com/akatz-ai/ComfyUI-Basic-Math
    

    Restart ComfyUI, then grab it under Basic Math ➕ → Primitives. Or use ComfyUI Manager → Install Custom Nodes → search "ComfyUI-Basic-Math".

    The gotchas

    The one trap: BOOLEAN sockets won't accept a number. If you try to feed this pack's BooleanLogic from a math result, it'll refuse the connection - convert with ToBool first. And remember you'll see it listed as "Boolean | Basic" in the menu, not just "Boolean"; the | Basic suffix is this pack's naming convention so it doesn't collide with the dozens of other boolean nodes out there.

    Beyond that, there's honestly not much to get wrong with a checkbox. That's the appeal.

    CategoryBasic Math ➕/Primitives

    Inputs (1)

    NameTypeDefaultDescription
    valueBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN