Nodes/ControlAltAI Nodes/Boolean Reverse
ComfyUI Node

Boolean Reverse

Flip a true to false and vice versa

By gseth·Created 2 years ago·Updated about a year ago· 209
Boolean Reverse
    • BOOLEAN
    booleantrue

    A NOT gate. Feed it true, it outputs false; feed it false, it outputs true. That's the entire node, and it's more useful than it sounds the moment you have one decision that needs to drive two things in opposite directions.

    The classic case: you've got a single toggle that means "use the high-quality path." One node wants that boolean as-is, another node needs its inverse ("skip the fast path"). Rather than maintaining two toggles you have to remember to keep in sync - a reliable way to eventually contradict yourself - you drive both from one, running the inverse branch through Boolean Reverse. One source of truth, no drift.

    How it works

    One input, boolean (defaults to true), one output, BOOLEAN, which is the logical inverse. Nothing configurable - it just negates.

    Where it shines is anywhere you have complementary switches. Take the pack's Choose Upscale Model node: its use_model_1 flag picks model 1 on true and model 2 on false. If somewhere else in the graph you need a flag that's on exactly when model 2 is selected, run the same source boolean through Boolean Reverse and you've got it, guaranteed to stay opposite.

    The inputs and outputs that matter

    • boolean - the value to flip.
    • BOOLEAN - the inverted result.

    How to install it

    ComfyUI Manager → search ControlAltAI Nodes → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/gseth/ControlAltAI-Nodes
    

    then restart. Pure logic, no downloads.

    Common issues

    There's nothing to misconfigure - it has no settings. The only conceptual snag is forgetting it's there and wiring a second manual toggle instead, which reintroduces exactly the sync problem this node exists to kill. If two toggles in your graph are supposed to always be opposites, that's a Boolean Reverse, not two separate switches. It defaults to true, so straight out of the box (with nothing wired into it) its output is false.

    CategoryControlAltAI Nodes/Logic

    Inputs (1)

    NameTypeDefaultDescription
    booleanBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN