小珠光反向布尔
The one-line inverter that keeps your logic branches sane
- inverted_boolean
Sometimes the whole job is "not". 小珠光反向布尔 (Xiaozhuguang Bool Not) takes a boolean in and gives you its inverse out: true becomes false, false becomes true. That's the entire node, and it earns its place the way every single-purpose logic node does - by making a workflow readable instead of forcing you to invert logic in your head.
The classic case: you have a "show watermark" boolean from a toggle node, but the downstream node takes "hide watermark". Rather than build the inverted expression out of a compare node or maintain a second copy of the value that can drift out of sync, you drop a Bool Not between them. Same for "only run this branch when the data block is not passing" - invert the gate's boolean and the graph reads like plain English.
How it works
It's literally return (not boolean,). A BOOLEAN input with a false default, a BOOLEAN output named inverted_boolean. There's nothing else - no settings, no wildcard magic, no edge cases worth documenting. It's the kind of node that exists because ComfyUI's core still doesn't ship a dedicated boolean inverter you can find in a search, so every utility pack ends up adding one.
The input and output
boolean- the boolean you want flipped.inverted_boolean- its negation, ready to feed any boolean input downstream.
Chain two of them and you get the original back (double negation, in case you need a no-op to make a branch visually explicit).
Install
From the ComfyUI-xiaozhuguang pack - Manager (search "ComfyUI-xiaozhuguang"), or:
cd ComfyUI/custom_nodes/
git clone https://github.com/xiaozhuguang/ComfyUI-xiaozhuguang.git
Restart. No dependencies to speak of.
Gotcha
About the only way to misuse this is to connect nothing - an unconnected boolean input defaults to false, so the output is silently true and your branch runs when you expected it not to. If a workflow using this node behaves backwards, check that the boolean is actually wired. It's a one-liner, but the wiring is still on you.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| inverted_boolean | BOOLEAN | — |