FloatIfElse
The if/else your decimal values have been missing
- FLOAT
Here's a workflow pattern you'll hit within your first week of building real graphs: you want a value - a denoise strength, a CFG, an upscale factor - to be one number in one situation and a different number in another. ComfyUI's core primitives handle the "hold a number" part fine, but choosing between two floats based on a condition is a gap. This node is that gap, filled.
It takes a boolean, and depending on whether it's true or false, passes through one of two floats you provide. That's the entire job. It sounds insultingly simple until you realize how many places it fits: switch between high/low denoise when a seed range triggers, swap CFG between a style pass and a detail pass, pick a different upscale factor per branch of a conditional workflow. In the plumbing layer this is a classic A/B switch, specialized for FLOAT.
How it works
The mechanism is three lines of logic dressed as a node. The conditioning input is a boolean - true selects input_true, false selects input_false, and the chosen value comes out the single FLOAT output. Nothing is blended, nothing is recalculated; you're literally routing one of two numbers.
One naming gripe: the selector is called conditioning, which is genuinely confusing because in ComfyUI "conditioning" almost always means the text-encoded CONDITIONING type. Here it's just a BOOLEAN checkbox. Wire a boolean from another logic node (this pack's CompareNumbersToCombo-style comparators, a PrimitiveBoolean, or any node outputting BOOLEAN), or just tick it by hand.
The inputs that matter
conditioning- the boolean selector. True →input_true, False →input_false.input_true- the float you get when the selector is on.input_false- the float you get when the selector is off.
Both float inputs are optional with a default of 0, so if you leave one unwired you'll silently get a zero on that branch. That's the main footgun: it won't error, it'll just quietly pass 0.0.
Installing it
Part of ComfyUI-Przewodo-Utils. ComfyUI Manager → search the pack, or:
cd ComfyUI/custom_nodes
git clone https://github.com/przewodo/ComfyUI-Przewodo-Utils.git
Restart and it's under PrzewodoUtils. It needs no extra dependencies - pure Python routing.
Where people get tripped up
The optional-inputs-default-to-zero behavior is the one that bites: connect only the true branch and a false condition still yields 0.0, which can silently zero out a denoise or CFG downstream. If you're seeing weird "everything is blank" results after adding this, check that both floats are actually wired.
And a fair warning: if you want more than a two-way float switch, core ComfyUI and several bigger packs (rgthree's switch family) offer indexable multi-way switching. This node is the minimal tool for the two-value case - which is exactly what most conditional workflows actually need.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | BOOLEAN | true | Boolean condition that determines which float value to return. True returns input_true, False returns input_false. |
| input_trueopt | FLOAT | 0.00 | Float value to return when conditioning is True. |
| input_falseopt | FLOAT | 0.00 | Float value to return when conditioning is False. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |