OR
True if any of your booleans is true
- inputs
- BOOLEAN
OR takes two to ten boolean inputs and returns true if any of them is true. One true input and the whole thing fires; only when every single input is false does it go false. It's the "any of these conditions" node, and it's the sibling to AND from the same pack - where AND is "all must pass," OR is "any will do."
The classic use is fallback and alternative logic. "Run this if the quality check passed OR the user force-flagged it." "Trigger this branch if the model is FLUX OR SDXL." "Do the expensive step if either of two conditions holds." It's also how you build a "somebody said yes" gate - collect a set of booleans from different checks and fire when any one of them comes back positive. In routing-heavy workflows, OR is what lets multiple triggers reach the same downstream action without duplicating wires.
How it works
inputs is an autogrowing list - two to ten booleans, added with the plus button. On execution the node runs Python's any() over the collected values and returns the single resulting boolean. No state, no ordering surprises, fully deterministic.
The thing to keep in mind is that every input is expected to be a real boolean. OR doesn't coerce "truthiness" the way Python sometimes does elsewhere - feed it actual boolean outputs (compare nodes, LogicIF outputs, toggles) and it behaves exactly as advertised. If you wire something that isn't a boolean, the type mismatch will surface downstream rather than in the node itself.
The inputs that matter
inputs(2–10): the booleans to OR together.
Output is a single BOOLEAN. Wire it into a LogicIF to pick a branch, into another OR to grow the gate, or into a switch to route on "any."
One mental shortcut that prevents the most common mix-up: if the condition is "at least one of these is true," that's OR; if it's "all of these must be true," that's AND. Swapping them produces exactly the "sometimes it works and I can't figure out why" bug, because the failure only shows up when the inputs don't all agree.
Install
This node ships in the ComfyUI-LogicMath pack. Install via ComfyUI Manager (search "ComfyUI-LogicMath", Install, restart) or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-LogicMath
No pip requirements, no model files. The pack uses ComfyUI's newer extension API, so update ComfyUI if the node doesn't appear.
Common issues
- Gate fires "too often" - that's OR working as designed. One true input is enough; check your inputs if you meant "all."
- Type errors on a wired input - feed it real booleans, not numbers or strings.
OR and AND together are the two verbs of conditional ComfyUI graphs. Learn both, keep them straight, and "if any / if all" logic stops being a chore.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| inputs | COMFY_AUTOGROW_V3 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |