ComfyUI Node

Boolean NOT

Boolean NOT — flip any condition, the one-input inverter

By aesethtics·Created about a year ago·Updated about a year ago· 1
Boolean NOT
    • result
    valuetrue

    Sometimes you want the opposite of a condition. "Run this unless the flag is set." "Only do this when the batch is not full." That inversion is the whole job of this node: one boolean in, the exact opposite boolean out. It's the simplest node in the pack's logic trio - AND and OR combine two conditions, NOT just flips one - but it's the one that turns a condition into its mirror image, which is a surprisingly common need.

    It's from the Utilitools pack. The single required input is value (BOOLEAN, default true), and the single output is result (BOOLEAN). Wire a true in, get false out. Wire a false in, get true. There's nothing else to configure, which is the point.

    How it works

    The mechanism is Python's not value - a strict inversion. true becomes false, false becomes true, and there's no in-between state to worry about. No threshold, no debouncing, no cleverness. That's exactly what you want from a gate like this.

    The one thing to note is the default: value defaults to true, so a freshly dropped NOT node outputs false. That's the opposite of the pack's AND node (which defaults to true and passes through when unconnected). It's not a bug - it's just the natural output of "invert the default true." If you drop a NOT node expecting it to start "off," you'll get the mirror behavior, so wire your real condition into it before trusting the output.

    Where it fits

    The useful patterns are all about inverting a gate before it branches. Feed it the output of a Boolean AND or OR to get the "not" of a combined condition. Pair it with the pack's If Then Else: NOT can flip which branch runs without rewiring the whole graph - if you'd wired the branches backwards, one NOT fixes it. You can also use it to make an "unless" condition from any boolean source, which reads better in a shared workflow than a pile of crossed wires. It's a small node that does one thing, and it's the reason the logic trio feels complete - with AND, OR, and NOT you can express any boolean combination of your conditions.

    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 downloads, no requirements.txt - the whole pack is stdlib Python. It's a tiny pack nobody's really talking about, but the inverter is one of those nodes you don't appreciate until a condition needs to be backwards.

    CategoryUtilitools/Logic

    Inputs (1)

    NameTypeDefaultDescription
    valueBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    resultBOOLEAN