๐บ One Minus Float List
1 minus every float
- floats
If you have a list of floats meant to live on a 0โ1 scale - per-frame weights, strength ramps, opacity curves - their exact complement is 1 - x, and you'll want it constantly. Fade up needs a fade down. A pass that's strongest at the start wants a mirror pass strongest at the end. One Minus Float List is that complement, applied to a whole list at once: feed it list_of_floats, get back [1 - x for x in list_of_floats]. That's the entire node, and it's honest about being nothing more.
Why it exists separately
ComfyUI doesn't ship a "list math" node that does this in place, and doing it with scalar nodes means unpacking the list, inverting each element, and rebuilding it - three nodes and a headache for a one-liner. This node collapses that into a single socket-to-socket transform. The output floats has the same length and order as the input; every value is replaced by its complement.
The key assumption, and the thing to check: it's literally 1.0 - x, so it's only meaningful when your floats are already normalized to 0โ1. If your list spans 0.2โ0.8, the complement will span 0.8โ0.2 but the values assume a 1.0 ceiling - a list built on a 0โ100 scale gets nonsense (100 becomes -99). For non-normalized ranges, the pack's ๐บ Inverse Map Float List is the better mirror (it flips around the list's own min/max), and ๐บ Remap Float List handles rescaling into a target range. This node is for the simple, common case: already-normalized, just complement it.
Where it fits
The classic pairing is crossfade/strength curves. Generate one ramp - say with the pack's ๐บ Interpolated Float List - and this node produces the exact opposite ramp for a second pass or a mirrored LoRA weight. It also shows up in mask/threshold work where you need "sharpness" where you have "blurriness" and vice versa. Because it's per-element and order-preserving, you can feed the result straight into any node that consumed the original list, and both stay in sync.
The gotchas
- No normalization. It does not look at your data. If your list isn't 0โ1, this node will happily produce wrong-looking numbers without warning. It's a raw arithmetic transform.
- Empty list is fine -
[1 - x for x in []]is just[], no error. But an empty input usually means a wiring problem upstream, so a silently-empty complement might be masking a real issue. - Floating-point tails.
1 - 0.3in a computer is0.7plus a tiny epsilon noise. If you're comparing values for exact equality downstream, expect the usual float fuzz.
Install
ComfyUI Manager (search "Nilor Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/nilor-corp/nilor-nodes
cd nilor-nodes && pip install -r requirements.txt
Restart ComfyUI; it's under Nilor Nodes ๐บ โ Generators. No dependencies.
Bottom line
The node you'd write in a comment if ComfyUI let you: "invert this list, please." It saves a three-node detour every time you need a complementary curve, and it's impossible to misuse as long as you remember it assumes a 0โ1 scale. Keep it next to the other float-list nodes in the pack and you'll reach for it more than you'd expect.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| list_of_floats | FLOAT | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| floats | FLOAT | โ |