(deforum) FLOAT Comparator
Compare two floats to drive the logic chain
- BOOLEAN
Deforum animations get complicated fast, and once you're a few days in you'll want "only do X when Y is true." This node is the smallest brick in that machinery: it takes two floats, compares them, and hands you a BOOLEAN you can feed into a switch, an Image Switcher, or a conditional branch elsewhere in the pack.
It's a pure utility node, no model, no downloads, no hidden state. What you see is what you get.
Inputs and output
float_1andfloat_2- the two numbers to compare. Both are plainFLOATinputs, so wire them up to a schedule value, aFrame Data Extractoutput, an audio analysis value, anything numeric your workflow produces.condition- pick from<,<=,>,>=,==.
The single BOOLEAN output is true when the comparison holds. That's the whole node.
Where it actually earns its keep
Pair it with the pack's other logic nodes (Logical NOT, Logical OR, the INT comparator). The classic move: extract the current frame_idx from a Frame Data Extract node, cast the comparison to floats, and flip a behavior mid-animation - "switch the prompt style after frame 200," "only apply the hybrid video after the intro," that kind of thing. ComfyUI's graph will happily treat a Boolean as a gate, and once your loops are conditional they stop being one-shot renders.
Installation
It ships inside Deforum Nodes, so:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git
Restart ComfyUI - or install "Deforum Nodes" by XmYx via ComfyUI Manager. Since this node is pure logic you don't even need the full backend working to test it; the heavy deforum-studio install only matters once you're actually running the animation loop.
Gotchas
There aren't many, which is the point. One thing worth knowing: == on floats is strict, and two values that look equal (say, a schedule evaluated to 1.0 versus a literal 1.0) can be a hair apart in floating point. If your equality check mysteriously fails, reach for a range check with < / >= instead of debugging arithmetic at 3 a.m.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| float_1 | FLOAT | 0.00-999999–4294967296 | — |
| float_2 | FLOAT | 0.00-999999–4294967296 | — |
| condition | COMBO | 5 options: <, <=, >, >=, == |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |