QH: Bool Unary Operation
A NOT gate for ComfyUI, with a bypass switch built in
- Result
This is the smallest node in the QaisHelper pack and it's not trying to be more than it is: a boolean pass-through with an invert toggle. One boolean in, one boolean out. If Invert is on, you get the opposite of what you put in. If it's off, you get back exactly what you gave it. That's the entire job.
Is it useful? Yes, in a boring, dependable way. Boolean workflows are full of moments where you've got the truth value you need but flipped - "the upscaler should run when the detail level is not high," "route on the opposite of what this compare node reported." Rather than reach for a whole binary-op node or restructure your logic upstream, you drop in a NOT. And because the invert flag is a normal boolean input, you can even wire it: flip the gate programmatically instead of clicking it.
How it works
Two inputs, both booleans:
Input- the value to pass through.Invert- when true, the output isnot Input; when false, the output isInput.
The output is Result, a BOOLEAN. The source is a two-branch if statement - no lookup tables, no state, just "if invert, negate, else pass." Honestly, you could reproduce this with ComfyUI's built-in boolean primitives and a couple of nodes, but this collapses it to one tidy box, which is the point of these little utility packs.
Where you'd actually use it
A couple of recurring spots:
- Inverting a condition before a Switch - you have a boolean that means "quality mode on," but your switch expects "bypass on." One invert, done.
- Making a gate easier to reason about - sometimes the node upstream produces "false = run," and you'd rather wire a true-to-run signal through the rest of the graph.
It's also handy as a debugging pass-through: keep Invert off and it's a clean way to inspect a boolean in the middle of a chain.
Installing it
Same story as the rest of the pack - tiny, numpy-only, no model downloads:
- ComfyUI Manager - search "ComfyUI-QaisHelper" and Install.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/QaisMalkawi/ComfyUI-QaisHelper, then restart.
You'll find it under "Qais Helper/Boolean Operations" as "QH: Bool Unary Operation."
The honest take
This is a node you install by accident and use twice. It's not a headline feature - it's a two-line helper that exists because the pack author needed it and shipped it. Don't go hunting for it; if you're already running the pack and your boolean is backwards, it's there. If you don't run the pack, this single node isn't reason enough to install it. It does exactly what it says and nothing more, and for a utility node that's a fair deal.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| Input | BOOLEAN | — | |
| Invert | BOOLEAN | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Result | BOOLEAN | — |