Nodes/Deforum Nodes/(deforum) Logical NOT
ComfyUI Node

(deforum) Logical NOT

The one-node inverter for conditional animations

By XmYx·Created 3 years ago·Updated 4 months ago· 198
(deforum) Logical NOT
    • BOOLEAN
    condition

    Sometimes a Boolean comes into your graph backwards - you want to act when a condition is not true. That's this node's entire job: feed it a BOOLEAN and it returns its logical negation. True in, False out. False in, True out. No options, no settings, no model, no downloads.

    It looks trivial, and it is. But inside a conditional animation chain - the kind where a FLOAT Comparator or Frame Data Extract gates what happens at each frame - an inverter is what turns "switch the prompt when this is true" into "switch the prompt when this is false," which is usually the logic you actually wanted.

    Input and output

    • condition - a BOOLEAN, wired from any logic node or frame data output.
    • BOOLEAN - the inverted value, ready to feed a switch, an Image Switcher, or another logic node.

    That's the whole thing. If it's not obvious yet, combine it with Logical OR or a comparator and you've got real branching in your animation graph.

    Installation

    It ships inside Deforum Nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/XmYx/deforum-comfy-nodes.git
    

    Restart ComfyUI, or install "Deforum Nodes" by XmYx via ComfyUI Manager. Pure logic, so it works even if you haven't finished the heavy backend install - the only requirement is that the pack is loaded.

    When you'd reach for it

    The realistic pattern: you have a condition like frame_idx > 100 and a node that fires when a gate is false. Instead of rewriting the comparator, drop a Logical NOT between them. It's also the natural partner for DeforumOrNode when you're building "anything except this one case" logic. Small node, quietly essential once your workflows stop being linear.

    If you're new to all of this, don't overthink it - it's a not statement with a wire instead of a keyword. If you never use it, your workflows were probably simpler than the ones that need it.

    Categorydeforum/logic

    Inputs (1)

    NameTypeDefaultDescription
    conditionBOOLEAN

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN