ComfyUI Node

OR

True if any one of your conditions passes

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
OR
  • inputs
  • BOOLEAN

UC_LogicOR is the "any of these will do" gate: it returns true when at least one connected input is true. Like its AND sibling in this pack, the inputs autogrow - add as many sockets as you have conditions, and the moment any one of them is true, the output flips. It's the node you reach for when a workflow should proceed if any trigger fired, rather than requiring all of them.

Real uses: "proceed if the user hit the run button, or a scheduled trigger fired, or a seed changed." "Use the fast path if the model is Turbo or the resolution is low." "Log this frame if it's a keyframe, an outlier, or the last frame." One OR collapses a whole decision tree into a single gate.

How it works

One line under the hood: any(inputs). Every connected boolean is checked; true if any is truthy, false only if every input is false. The autogrowing input type is the same as the rest of the pack's logic family, so a multi-condition OR is one node, not a pyramid of nested ORs.

One input group (inputs, autogrowing boolean sockets), one output (BOOLEAN). That's the entire API.

How it plays with the pack

OR is half of a natural pair with UC_LogicAND - feed the OR's output into an AND alongside a "should this run at all" gate and you get "proceed if (any trigger) AND (enabled)". The output also drives UC_LogicIF, which picks between two values based on a boolean, letting you turn the OR's verdict into an actual different branch: true → heavy processing, false → pass-through. Together they're the conditional spine of a workflow that reacts to conditions instead of always doing the same thing.

Install

Part of silveroxides/ComfyUI-UtilsCollection's logic family, which replaces the equivalent nodes from ComfyUI-LogicMath:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Restart (or ComfyUI Manager → search "ComfyUI-UtilsCollection"). Deps are opencv-python and typing-extensions. If you still have the old standalone LogicMath pack installed, remove it before accepting ComfyUI's replacement prompt, or you'll get conflicting node IDs.

The footgun, mirroring AND: an OR with nothing connected evaluates to any([]) - false. That's the safe default (nothing passed, gate closed), and actually the behavior you'd want. Just don't be confused when an unconnected OR stays false; that's correct, not a bug.

Categoryutils/logic

Inputs (1)

NameTypeDefaultDescription
inputsCOMFY_AUTOGROW_V3

Outputs (1)

NameTypeDescription
BOOLEANBOOLEAN