🎈LG_浮点数[0-1]
A float slider that physically cannot leave 0–1
- float
LG_FloatRange (that's "浮点数", the Chinese for float) is the smallest honest node in the whole LAOGOU pack: one slider, one number out. It exists to give you a float value that is clamped to 0–1, snaps in 0.01 steps, and can't be fat-fingered into 1.5.
That sounds trivial until you've spent an afternoon hunting an img2img pass that keeps coming out as a full regeneration because some node took a denoise value of 3. This node is a guard rail for exactly that.
What it does
Drag the slider, get the value. The widget enforces the 0–1 range and the 0.01 step on the front end, and the Python side rounds to two decimals as a second line of defense. The output is a plain FLOAT, ready to plug into anything that consumes one.
Input:
- value - the float, 0.00 to 1.00, step 0.01. The author's own tooltip spells it out: "0-1范围的浮点数,精度控制在小数点后2位" (a 0-1 float with precision to two decimal places).
Output:
- float - the rounded value.
The honest part about where it fits
Here's the trap nobody warns you about: in ComfyUI, most of the numbers you actually tune - KSampler's denoise, CFG, sampler strength - are widgets on the node itself, not wire inputs. You can't drag a wire into a widget. So a float-source node only earns its keep when something downstream has a genuine FLOAT input port.
That's still a real population: mask-blur radii, blend opacities, ControlNet strength if you're using a version that exposes it as an input, custom nodes with float parameters, API-driven setups where you want a value you can drive or expose. If you're running ComfyUI through its API and want a denoise-ish knob you can script, a node like this is how you get one out of the graph.
Also fair to say: if you just want a number between 0 and 1 inside a workflow for your own bookkeeping, any text/number node does this. LG_FloatRange's edge is that it's a slider - quick to grab, hard to mis-type, and it rounds consistently so identical sliders give identical numbers.
Installing it
Part of Comfyui_LG_Tools - install via ComfyUI Manager (search "Comfyui_LG_Tools") or:
cd ComfyUI/custom_nodes
git clone https://github.com/LAOGOU-666/Comfyui_LG_Tools.git
pip install -r requirements.txt
Restart, then right-click → 🎈LAOGOU → Utils.
Gotchas
- It rounds to two decimals (Python's
round), not to a multiple of 0.01 you might want - fine for denoise-style values, pointless if you needed 0.005 resolution. - No seed, no random, no input wire - it's a source node, so its output only changes when you drag it. Set it once and it's just a constant.
For what it is - a disciplined little number feeder - it works. Just don't expect it to do more than hold a 0–1 value and look tidy.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | FLOAT | 0.000–1 | 0-1范围的浮点数,精度控制在小数点后2位 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| float | FLOAT | — |