ComfyUI Node

OR

The 'any of these is good enough' gate

By danipisca07·Created 6 months ago·Updated 6 months ago· 0
OR
    • BOOLEAN
    afalse
    bfalse

    OR takes two booleans and returns True if at least one of them is True. Only when both are False do you get False. It's the "any of these is good enough" gate, and along with NOT and the switch nodes, it's one of the handful of logic pieces you'll actually use every time you build a conditional workflow.

    Why you'd reach for it

    Think of any "if this OR that" decision in a pipeline. You want to re-run the upscale pass if the image is too small or if a sharpness check failed. You want to trigger a face-fix branch if the face detector found a face or if the eyes detector did. Two booleans, one OR, and the combined result feeds straight into a switch node's condition socket to route the workflow.

    It's also how you consolidate guards. Instead of three separate conditions each fighting for the same switch, you OR them together into one flag. Fewer wires, a graph that reads top to bottom, and one place to look when the logic misbehaves.

    How it works

    It's literally Python's a or b - two booleans in, one boolean out, no dependencies and no state. The author's description is exactly what it does: "Returns True if at least one input is True." It sits in the SimpleLogics/Logic category, one menu over from AND, NOT, XOR, NAND, and NOR.

    The inputs that matter

    Both are required BOOLEAN inputs, both default to False:

    • a - first boolean
    • b - second boolean

    One BOOLEAN output. Wire it into a switch's condition, or feed it into another gate if you're combining more than two conditions.

    Installing it

    Part of danipisca07/ComfyUI-SimpleLogics, a tiny dependency-free pure-Python pack - no requirements.txt, no models, no downloads. Install from ComfyUI Manager (search "SimpleLogics") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/danipisca07/ComfyUI-SimpleLogics
    

    Then restart ComfyUI.

    Common issues

    A boolean gate has no failure modes worth losing sleep over. The one mental trap is thinking of OR in the everyday "or else" sense and expecting it to be exclusive - it's not, and if you need "exactly one of these," that's the pack's XOR node instead. Easy to forget mid-workflow. Also worth noting once: installing SimpleLogics registers an undocumented GeoCalib camera node alongside the logic gates, which is unrelated and safe to ignore. Otherwise, OR just works.

    CategorySimpleLogics/Logic

    Inputs (2)

    NameTypeDefaultDescription
    aBOOLEANfalse
    bBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN