ComfyUI Node

Negate Value

Flip a boolean (or a number's sign) inline

By aria1th·Created 3 years ago·Updated 7 months ago· 116
Negate Value
  • input1
  • *

Negate Value flips whatever you give it. Sitting in the same "Logic Gates" category as AAndBGate, its main job is inverting a boolean condition - feed it True and get False back - which is exactly what you need when a downstream gate or switch expects the opposite of the flag you already have, and you don't want to rebuild the whole condition to get there.

It's a one-input, one-output utility, and it's genuinely handy for the small case where you've computed "should I skip this step" but the switch you're feeding actually wants "should I run this step" - instead of rewriting the upstream logic, you just negate it once at the boundary. Since both the input and output are typed as accepting anything, it isn't strictly locked to booleans either; it'll happily take a wired number too, in which case negation behaves the way you'd expect a numeric negate to.

How it works

It inverts the value it's given and passes the result straight through - logically for boolean-shaped inputs (true becomes false), and by sign for numeric ones. There's no separate mode switch on the node itself; what you feed it decides what "negate" ends up meaning.

The inputs and outputs that matter

  • input1 - typed *, default 0. Wire in a BOOLEAN from a comparison or gate, or a number if that's what you're flipping.
  • Output - typed * as well, matching the shape of whatever came in, just inverted.

How to install it

Comes with the whole LogicUtils pack. Via ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils

then restart ComfyUI. No models, no dependencies worth mentioning - pure Python.

Some background on where this comes from: the author is aria1th, publicly known as AngelBottomless, the trainer behind Illustrious XL - the SDXL anime finetune that displaced Pony Diffusion v6 as the open-source default. LogicUtils is a side project, a toolbox of small control-flow nodes he built for his own graphs, and the README is upfront about the docs: "Proper documentation is being prepared, however there are too many nodes." That's held since the repo's last push in early 2026. It's a real, used pack all the same - it turns up as a dependency in complex published workflows next to rgthree-comfy and comfyui-kjnodes - it just relies on the node name and defaults to explain itself, which is what this article is doing on its behalf.

Common issues & troubleshooting

Output isn't a clean True/False. If you fed it something other than a real boolean - a number, a string - the "negation" follows whatever type you gave it rather than snapping to boolean. If you need a guaranteed BOOLEAN out, feed it a proper boolean in (from a comparison node, for instance) rather than a raw number or string.

Double-negating by accident. Chaining two Negate Value nodes back to back just returns you to the original value - easy to lose track of in a busy graph. If a downstream condition looks backwards, count how many Negate nodes are actually in that wire.

Expected it to negate a whole logic expression, not just one value. This node only inverts what's directly wired into it - it doesn't reach back and flip an upstream computation. Combine it with AAndBGate (same pack) if you're building a compound condition like NAND or NOR.

CategoryLogic Gates

Inputs (1)

NameTypeDefaultDescription
input1*0

Outputs (1)

NameTypeDescription
**