Float Switch
The float if/else you'll wire everywhere
- FLOAT
Nifty Float Switch is the floating-point twin of Nifty Int Switch: a boolean picks between two FLOAT values. True → on_true, False → on_false. If you've ever wished a single checkbox could flip your denoise from 0.55 to 0.75, or swap CFG between 4 and 7, this is the node.
It's the unglamorous plumbing of configurable workflows. Feed one boolean into several Float Switches and a whole graph's parameters follow a single master toggle: "draft vs. final" flips denoise, strength, and guidance all at once. Wire the boolean to a compare node or a seed's parity and you get a cheap way to A/B two settings without rebuilding anything.
The inputs that matter
- boolean - selector (default
True). - on_true - float returned when
True(step 0.01). - on_false - float returned when
False.
Output: FLOAT, the selected value.
Ranges are effectively unbounded (full float64 span), so no value you actually need is out of reach. The step of 0.01 is fine for denoise and CFG tuning - you won't notice the rounding at the scale you work at.
Where it sits in the pack
This is one of three primitive switches (Int, Float, and String). They exist because the generic Nifty Input Switch routes any type by boolean - but that node's inputs are lazy and expect actual data. When the two candidates are just literal widgets you typed, the dedicated Float Switch is cleaner, has no lazy-evaluation surprises, and reads instantly when you come back to a workflow months later.
Pair it with Nifty Is None or a Number Compare upstream and the boolean practically writes itself. It's boring in the best way - the sort of node you forget is there until you need to change a strength mid-project and realize a toggle just saved you twenty minutes of node-diving.
Install
Same pack, standard steps - ComfyUI Manager search "Nifty Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes
Restart ComfyUI. Keep ComfyUI current since Nifty Nodes runs on the v3 API. No extra dependencies here; it's a pure widget node.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean | BOOLEAN | true | Determines which float value is returned. |
| on_true | FLOAT | 0.00-9223372036854776000–9223372036854776000 | Returned when boolean is True. |
| on_false | FLOAT | 0.00-9223372036854776000–9223372036854776000 | Returned when boolean is False. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |