ComfyUI Node

or

Proceed if any of these are true

By StableLlama·Created about a year ago·Updated about 15 hours ago· 48
or
    • BOOLEAN
    input1false
    input2false

    "Proceed if any of these are true." That's or - the most forgiving gate in the boolean family, and after and and not, the one you'll actually use. It's the node that lets a workflow say "use the fallback if either of these things happened" instead of forcing you to wire every possibility as a separate branch.

    It's part of Basic data handling, StableLlama's zero-dependency pack. OR shows up in real workflows constantly: "run this if the flag is set or the input changed," "show the error path if either check failed." Once your graph accumulates more than one boolean, you'll be reaching for this.

    How it works

    Output is true if input1 is true, if input2 is true, or both. Only false when both inputs are false. In Python it's input1 or input2, and there's no short-circuit cleverness to worry about in the graph - both inputs are plain BOOLEANs, the output is a plain BOOLEAN, and it composes with every other logic node in the pack. The inputs are forceInput, so they present as sockets for wiring rather than clickable toggles - build the conditions with nodes, not by hand.

    The inputs and the output

    • input1 (BOOLEAN, default False) - first condition.
    • input2 (BOOLEAN, default False) - second condition.
    • BOOLEAN (output) - true when either input is true.

    Three things on the node, that's it. Chain it with and and not and you can express any boolean combination a workflow throws at you.

    Installing it

    Install Basic data handling via ComfyUI Manager (search "Basic data handling"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
    

    Restart ComfyUI. No dependencies, no model files - a clean install every time.

    Troubleshooting

    • "I have three conditions and only two inputs." OR is strictly two-input. Combine two conditions with one OR, then feed that output into a second OR with the third. The pack doesn't do variadic logic nodes - chain them.
    • "Output is true when I expected false." With OR that means at least one input is true - and remember an unconnected input defaults to False, so it can't be the one forcing it true. Trace both wires; one of them is feeding a true you didn't intend.
    • "I wanted 'one or the other but not both'." That's exclusive-or - the pack's xor node - not OR. OR happily returns true when both conditions are met.
    CategoryBasic/BOOLEAN

    Inputs (2)

    NameTypeDefaultDescription
    input1BOOLEANfalse
    input2BOOLEANfalse

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN