Preset Float [BETA]
A denoise slider that refuses to go past 1.0 — guard rails for your floats
- FLOAT
Every ComfyUI user has hit the same small tragedy: you're dragging a denoise slider, it goes a hair past 1.0, and suddenly your clean render is static noise because you fed an out-of-range value to a model that assumed you'd stay in bounds. PresetFloatNode (display Preset Float [BETA]) exists so that doesn't happen. It's a float slider with preset ranges and step sizes baked in, and it clamps and rounds your value to fit whichever preset you picked. It's part of DemonAlone-JS_Addon-ComfyUI and, per the pack's own credits, is based on the Power Primitive node from rgthree-comfy - the quality-of-life pack that popularized "one node, one typed value, fanned out everywhere."
How it works
The honest mechanism is a bit clever and a bit of a compromise. ComfyUI reads a node's input definitions once at startup, so the node can't rebuild its widget ranges live when you change the dropdown. Instead the slider stays wide - 0 to 1000 - and the validation happens in execute(): it clamps your value to the selected preset's min/max, then snaps it onto the preset's step grid and rounds off floating-point dust. So the widget feels like a universal slider, and the output is guaranteed sane.
The presets, straight from the source:
- Denoise (0.0 – 1.0, step 0.01) - default 0.5
- CFG Scale (1.0 – 30.0, step 0.5) - default 8.0
- FPS (1 – 120, step 1) - default 24.0
- Strength (0.0 – 2.0, step 0.05) - default 1.0
That's the whole point: Denoise is the only preset where the slider can't exceed 1.0, because the node enforces it server-side no matter what you type in.
The inputs and output
Two inputs: preset (the dropdown) and value (the slider, wide range). One FLOAT output with the clamped, stepped result. Wire it wherever a float needs a source - the classic move from the primitive playbook is converting the widget on a KSampler to an input and feeding this one node to it, so one slider drives denoise across five samplers at once. Same idea as a PrimitiveFloat, just with the guard rails attached.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/DemonAlone/DemonAlone-JS_Addon-ComfyUI
Or search "DemonAlone-JS_Addon-ComfyUI" in ComfyUI Manager. Restart, and it's under CustomNodes/Presets. No models, no extra dependencies.
Where people get burned
First, the honesty note: the widget doesn't re-range when you switch presets - you might type 50 into the box while CFG Scale is selected and only see it clamped to 30 when the graph runs. That's by design (startup-defined widgets) but it can look like a bug. The clamping is real; it just happens at execution, not while you type.
Second, if you already run rgthree and its Power Primitives, this is a redundancy you can probably skip - rgthree's version is more general. Where PresetFloat earns its place is precisely as the specialized drop-in: a denoise slider that physically cannot leave 0–1, which is a nicer failure mode than a corrupt render when you over-drag. It won't change your results by magic - the same values pass through - but it removes a whole class of "why is this garbage" mistakes from the equation.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | 4 options: Denoise (0.0 - 1.0, step 0.01), CFG Scale (1.0 - 30.0, step 0.5), FPS (1 - 120, step 1), Strength (0.0 - 2.0, step 0.05) | |
| value | FLOAT | 0.5000–1000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |