Float Number Compare
Compare two floats and hand the decision downstream as a boolean
- bool
Float Number Compare (1hew_FloatNumberCompare) is the floating-point member of the pack's compare family, and it exists because decision-making in ComfyUI usually comes down to "is this number bigger than that one." Take two FLOAT inputs, pick an operator, get a BOOLEAN. It's the sibling to Int Number Compare and the two are nearly identical - the difference is that this one doesn't truncate.
You'll reach for it when a gate depends on a value that isn't a whole number: a denoise strength, a CFG-ish scale, a threshold from a detection node, an audio duration in seconds. Int comparisons would silently round 1.9 to 1; this one compares what's actually there.
How it works
Same shape as its int sibling: a, operator, b, evaluate, output bool. Operators are ==, !=, >, >=, <, <= with == as the default. Ranges are generous (up to ±999,999,999 with 0.01 steps). The implementation is a plain six-way compare - no epsilon tolerance, no fuzziness, which is the one thing to remember about it.
Inputs and outputs
- a - first float.
- operator - the comparison, default
==. - b - second float.
- bool - the
BOOLEANresult.
Installing it
It's part of the 1hewNodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes
or via ComfyUI Manager ("1hewNodes"), then restart. No models, no downloads.
Where it fits
The natural pattern is gating: denoise > 0.6 feeding the pack's Any Switch Bool to choose a high-detail branch, or audio_duration >= 10 deciding whether to split a clip. The float version matters for exactly these because denoise values and thresholds are floats - route them through the int node and the comparison gets rounded first.
The caveat is floating-point equality. == on two computed floats (say, a value you derived and a constant you typed) will surprise you - 0.1 + 0.2 is not exactly 0.3 in binary, and neither is whatever your math node produced. Use > / < for real gates, or compare against a threshold with a small epsilon of slack. For anything where the numbers are typed by hand, == is fine. Keep that in mind and this is the pack's cleanest decision node.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| a | FLOAT | 0.00-999999999–999999999 | — |
| operator | COMBO | == | 6 options: ==, !=, >, >=, <, <= |
| b | FLOAT | 0.00-999999999–999999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| bool | BOOLEAN | — |