DD Not Gate
The one-input inverter that's harder to live without than it looks
- *
The Not Gate takes one boolean and flips it. That's the whole job, and it's the most-used node in this pack precisely because it's so unglamorous. The README even calls it "DD If Not": a flipped boolean. One input, boolean (default true), one output, and the output is not boolean. True becomes false, false becomes true, done.
ComfyUI ships comparison nodes that hand you booleans, but it doesn't hand you a clean "invert that" node, which is why this one earns a slot in a pack of logic utilities. It's the glue that lets you re-read a condition the way your workflow actually needs it.
Why you'd reach for it
Because every boolean you generate is phrased the wrong way around roughly half the time. A detector outputs "face found: true," but your branch is "run the fallback when no face was found." Rather than rework the upstream logic, you drop in a Not Gate and invert at the point of use. It's also the standard way to build the "unless" pattern: And Gate + Not Gate = "run when both conditions are NOT met," and Not Gate feeding an Or Gate gets you NOR. Every inverted gate in this pack is, mechanically, just this node in a trench coat.
A genuinely common spot for it: toggles. You have a UI toggle that means "skip the enhancer," but downstream you need "run the enhancer." One Not Gate converts the toggle's meaning without touching anything else, and anyone reading the graph can see the inversion happening at a glance.
What to know before you drop it in
boolean defaults to true, so an unwired Not Gate outputs false. That's not a bug - it's the correct flip of the default - but it's the first thing to suspect when a branch downstream is unexpectedly off. Wire the input, and the behavior is as predictable as a light switch.
There's also the type question: this is a gate, so both input and output are booleans. If what you actually want is "invert the meaning of a value" - pick B instead of A - that's a getter's job, not this node's. Not is for flipping booleans, and it refuses to pretend otherwise.
Installing
Part of DD-LogicNodes, so the shared install applies: ComfyUI Manager → search DD-LogicNodes → Install → restart, or git clone https://github.com/dumbdemon/DD_LogicNodes into ComfyUI/custom_nodes. No dependencies, no models, nothing to configure. The one requirement is a current-enough ComfyUI - the pack targets the newer extension API, so on older builds you won't see the node in the menu.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | BOOLEAN | — |