Boolean OR
Boolean OR — true if any input is true, the gate that opens wide
- result
The OR gate is the permissive one. Where AND demands every condition hold, OR is happy with any single one. Two booleans in, and the output is true if either of them is true - it only returns false when both are false. If you're building "do this if any of these conditions is met," this is the node, and it's the most forgiving of the pack's three boolean gates precisely because of how it defaults.
It's from the Utilitools pack, sitting in the logic category with Boolean AND and Boolean NOT. Inputs are a and b, both BOOLEAN, and here's the detail that matters: they both default to false. The output result is true if a is true, if b is true, or if both are. Only false when both are false.
Why the defaults matter
This is the gate where the default is the safe direction. Because both inputs start false, a freshly dropped OR node outputs false - it blocks by default. Wire in one true condition and it opens. That's the behavior you want when the node represents "should I do the extra step?" - nothing connected means no, any condition connected and true means yes. Compare that to the pack's AND node, which defaults to true and therefore passes through when unconnected. Different defaults, different failure modes: AND says "open unless told otherwise," OR says "closed unless told otherwise."
How it works and where it fits
The mechanism is Python's a or b - short-circuit, deterministic, boring in the best way. The classic use is combining multiple "trigger" conditions so any one of them kicks off a branch: "enhance if the image is low-res OR the face is bad" - feed both conditions in, OR them, and drive the pack's If Then Else with the result. It's also handy for fallback logic where you want an action whenever at least one source says it's needed.
As with all boolean gates, it only does something when its output feeds a branch or a control input - on its own it's just a true/false value sitting in the graph. The pattern that makes this pack's logic nodes worth installing is: condition sources → AND/OR/NOT to combine them → If Then Else to branch.
Installing it
Standard Utilitools install:
cd ComfyUI/custom_nodes
git clone https://github.com/aesethtics/ComfyUI-Utilitools
or search "Utilitools" in ComfyUI Manager and restart ComfyUI. It's under Utilitools → Logic. No dependencies, no model downloads - pure Python, nothing extra to install. It's a small pack with no real community presence, but the OR gate is the one you reach for when the answer should be "yes, if any of this is true."
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| a | BOOLEAN | false | — |
| b | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | BOOLEAN | — |