Float Switch (VantageV2)
Branch on a decimal, but watch that equals sign
- input_0
- value
Denoise, CFG, LoRA strength, upscale factor - the numbers that actually shape an image in ComfyUI are floats. So a switch that branches on a float has an obvious job: send 0.35 down one road and 0.7 down another, and skip the road you didn't take.
How it works
Same engine as Int Switch, different comparison type. You feed a FLOAT into value, define ordered rules in the title-bar gear dialog, and each rule pairs one of six operators - =, !=, <, <=, >, >= - with a decimal constant and a zero-based input index. First matching rule wins and its input_N is what comes out. Rules can select the same input more than once. The sockets are wildcards, so each branch can be an entire pipeline.
Unlike Any Switch and Switch index, the data inputs here are lazy: only the winning branch is requested for execution. That's the reason to prefer this node over a bare index pick when the branches are expensive.
The one real trap: exact equality
= on a float is a bitwise comparison. There's no tolerance, no "close enough". The README says so plainly, and it's the same footgun that bites people in every language that ever shipped a float: 0.1 + 0.2 is not 0.3.
Don't write denoise = 0.7. Write ranges:
| Order | Condition | Selected input |
| --- | --- | --- |
| 1 | value < 0.4 | input_0 |
| 2 | value < 0.75 | input_1 |
| 3 | value >= 0.75 | input_2 |
Ranges also have the virtue of not developing a hole. Note the middle rule still has to exist - a value of 0.8 with only the first two rules would fall through to None.
And None is the honest answer when nothing matches. It doesn't error, it doesn't fall back. If your workflow suddenly produces nothing after you slid a slider into an uncovered region, this is the node to look at first.
When it's the right tool
Imagen-style, the classic use is a strength ladder: below 0.3 you're barely changing the picture so send it to the light detail pipeline, above 0.8 you're practically regenerating so send it to the full img2img path. Wire a LoRA strength node or a denoise value into value, and let the graph commit to one route instead of you remembering to rewire after every experiment.
The neighbouring option: if you also need the node to hand back a value rather than a branch - say you want to map a denoise range to a step count - Float Value Switch is the same logic with typed literals instead of sockets.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/vantagewithai/Vantage-NodesV2.git
Restart ComfyUI, hard-refresh the browser, find it under Vantage/Utils (or search "Float Switch"). ComfyUI Manager should list the pack as Vantage-NodesV2; the git clone is the documented route.
There's no pip step - the repo has no requirements file and declares no dependencies in pyproject.toml, because every import is already in ComfyUI. The constraint is version, not packages: the pack needs a recent ComfyUI with the current frontend widget/title-button APIs, which is exactly what makes the gear-based rule editor possible.
Common issues
None out means no rule matched, the matched socket is unconnected, or an upstream branch handed over nothing. Check in that order.
Your rule edits don't take effect until you save the dialog and re-queue.
Equality comparisons that look right in the dialog but never fire are almost always a float artifact - switch them to < / >= and move on with your evening.
And if the node's socket layout looks wrong after a pack update, add a fresh instance; existing nodes keep the schema they were created with.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| value | FLOAT | 0.00 | — |
| conditions | STRING | [{"operator":"=","value":0,"input":0}] | — |
| input_0opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |