Nodes/DD-LogicNodes/DD Or Gate
ComfyUI Node

DD Or Gate

\"any of these is enough\"

By dumbdemon·Created 6 months ago·Updated a day ago· 0
DD Or Gate
    • *
    expression1true
    expression2false

    The Or Gate is the relaxed one. AND demands everything; OR is happy with anything. Feed it two booleans and it outputs true the moment either of them is true - only when both are false does it say no. Along with AND and NOT, this is one of the gates that actually carries real workflows.

    Two boolean inputs, expression1 (default true) and expression2 (default false), one boolean output. The math is plain Python's expression1 or expression2.

    Why you'd reach for it

    OR is the "any of these reasons is good enough" gate. A workflow should take the special path if any of several things is true - "subject detected OR hand detected OR the user flipped the manual override." Each condition feeds one input and you chain Or Gates for more than two conditions; the branch fires on the first true it sees.

    It's also the natural partner for the And Gate when you're building readable conditions. AND for "everything must hold," OR for "anything will do." Pair them with a getter (like DD Or Getter) and you've turned a pile of booleans into "which of these two results do I actually want," which is the same pattern that shows up in every conditional ComfyUI question people actually ask - "if X is true do one thing, otherwise do another."

    The default trap

    expression1 defaults to true and expression2 defaults to false - so a freshly dropped, unwired Or Gate outputs true, because the first input alone already satisfies the condition. Leave it half-connected and the output is stuck on true no matter what you feed the other side. This is the single most common "why is my branch always running" moment with this node. Connect both expressions and the behavior is exactly the truth table you expect.

    Why not just use a core node?

    Fair question - ComfyUI has comparison and switch nodes, but a plain boolean OR as a standalone, readable node is genuinely missing from core. This pack's whole pitch is "the logic nodes I think are missing," and OR is the flagship of that pitch. If you're already in the pack for the getters, this is the gate you'll actually keep on your toolbar.

    Installing

    Standard DD-LogicNodes install: ComfyUI Manager → search DD-LogicNodes → Install → restart, or git clone https://github.com/dumbdemon/DD_LogicNodes into ComfyUI/custom_nodes. No dependencies, no model downloads. It needs a reasonably current ComfyUI for the newer extension API - if the node's not in the menu, update ComfyUI before anything else.

    CategoryDD Logic Nodes/Logic Gates

    Inputs (2)

    NameTypeDefaultDescription
    expression1BOOLEANtrue
    expression2BOOLEANfalse

    Outputs (1)

    NameTypeDescription
    *BOOLEAN