Const Float
Set your CFG once, wire it everywhere
- float
Const Float is the "one value, many wires" node in Conditional Nodes by Mikudes, the small utility pack from levox00. It holds a single floating-point number and hands it out to anything that asks. That's the whole job - which sounds useless until you've set the same CFG on three samplers, forgotten one, and watched a single image disagree with itself.
The plumbing pattern
The pattern it sits in is ComfyUI's plumbing layer: a value node breaks a number out of its widget so the graph can fan it out from one socket instead of you typing it into a half-dozen places. ComfyUI core already ships PrimitiveFloat for this exact job, so the honest question is when Const Float beats it. Answer: when you're already living inside this pack, or when you want a named node that reads as "my CFG" at a glance. It's a convenience, not a capability.
How it works
Mechanically it's as boring as advertised. The value input is a FLOAT with a default of 7.0 (a nice nod to the classic SD CFG sweet spot), a range of 0 to 100, and a 0.1 step - a range built for CFG, denoise strength, and LoRA weights. You type a number, it comes out the float output unchanged. Nothing cached, nothing randomized, nothing to break.
The inputs that matter
value- the number. Default 7.0, min 0, max 100, steps of 0.1.float- the output. Same number. Wire it to any FLOAT input, like a KSampler's cfg or denoise, or a LoRA strength.
The gotchas
Where people get tripped up: the 0 lower bound. If you wanted to feed a negative strength somewhere (some LoRA nodes happily take negative values to invert a style), Const Float can't go below 0 - reach for core's PrimitiveFloat, which has no such limit. And there's no control_after_generate dropdown here, so this is a fixed value, full stop. That's usually what you want for a CFG; if you were hoping for a per-run randomize, this isn't the node.
Installing it
Installation is the pack's standard story: no pip dependencies (the project file lists none), no model downloads, pure Python over ComfyUI's core APIs. In ComfyUI Manager, search "Conditional Nodes by Mikudes" and install; or clone into custom_nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/levox00/Conditional-Nodes-Comfy-Ui
Then restart ComfyUI. It shows up in the conditional category in the node menu.
If you're building one of the pack's conditional workflows - a Const String feeding an If True that swaps a checkpoint - Const Float is the natural way to make the CFG or denoise travel with each branch. One value, one source, no silent mismatches.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | FLOAT | 7.00–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| float | FLOAT | — |