ComfyUI Node

NOT

The one-line inverter that makes your gates readable

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
NOT
    • BOOLEAN
    input

    UC_LogicNOT does exactly one thing: flips a boolean. True becomes false, false becomes true. It's the smallest node in the pack's logic family, and it's also the one you'll quietly reach for constantly, because half of writing readable conditional workflows is having a "not this" handy.

    The everyday use: most nodes and toggles express the positive case - "run the upscaler", "apply the LoRA", "use the fast sampler". But your logic often wants the inverse - "don't upscale if this is a draft pass", "skip the LoRA when the toggle is off". You can rewire every node's logic to be inverted, or you can put one NOT in front of the boolean and leave the rest of the graph alone. It's the difference between a readable graph and a maze.

    How it works

    One boolean in, one boolean out, and the output is just not input. Nothing else, no surprises, no optional anything. Unlike the autogrowing AND/OR/XOR in this pack, NOT has a single fixed input socket - there's nothing to autogrow when you're inverting one value.

    It composes exactly how you'd expect with the rest of the family: NOT feeding an AND gives you a "none of these" gate, NOT on an OR gives you "all of these are false", and a double-NOT is just an identity you can use as a documentation device (not that you should).

    A pattern worth knowing

    Boolean inversion is how you turn "if X then do A" into "if NOT X then do A" without touching the target. Combined with UC_LogicIF in this pack - which picks between two values based on a condition - a NOT lets you switch which of two branches runs. Flip the NOT and the branches swap. For toggles, that's often all you need, and it's more readable than hunting through the workflow for the one widget that's inverted.

    Install

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

    Restart (or ComfyUI Manager → search "ComfyUI-UtilsCollection"). Part of the logic family that replaces ComfyUI-LogicMath - if you still have that standalone pack, remove it before accepting ComfyUI's replacement prompt. Deps: opencv-python, typing-extensions.

    There's genuinely no trap here; it's a one-input, one-output inverter. If you've ever found yourself naming nodes "enable" and meaning "enable the thing when this is false", this is the node that stops the confusion - invert at the source, keep the rest honest.

    Categoryutils/logic

    Inputs (1)

    NameTypeDefaultDescription
    inputBOOLEAN

    Outputs (1)

    NameTypeDescription
    BOOLEANBOOLEAN