ComfyUI Node

Float

A float slider that remembers your last fifty values

By lucafoscili·Created 2 years ago·Updated 2 years ago· 50
Float
  • ui_widget
  • float
  • float_list
float0.0
enable_historytrue
randomizefalse
seed42

Denoise, CFG, strength, scale - most tuning knobs in ComfyUI are floats, and most of us tune by feel. LF_Float is the pack's upgrade on the boring built-in widget: a float input with a history of every value you've used, saved with its date, plus a randomize mode that cycles through that history instead of generating numbers out of thin air.

The pitch is simple. You've spent an evening sliding denoise from 0.4 to 0.6 to 0.75 and back, and somewhere in there was the sweet spot you can't remember. With this node, that value is in the list, one click away. It's the kind of small quality-of-life thing that sounds trivial until you actually use it - then you wonder why the default widget doesn't do this.

How it works

Four controls do everything. float is the value (step 0.1 by default). enable_history (on by default) records each executed value and its date, which is what feeds the history dropdown. randomize (off by default) picks a value from that history - note the constraint, it only chooses values you've actually used, which keeps your random walks inside a sane search space. And seed controls that pick so you can replay a sequence exactly.

Outputs are straightforward:

  • float - the current value, an honest-to-goodness FLOAT.
  • float_list - same value as a one-element list, for list-consuming nodes.

If you're doing prompt-parameter sweeps or just experimenting, this is the widget to drag in. And because it's stateful across runs, it doubles as a poor man's parameter log - every value you try is right there in the history.

Installing it

Same story as every node in this pack - install LF Nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/lucafoscili/comfyui-lf

Restart ComfyUI, or go through ComfyUI Manager and search for LF Nodes. Light dependencies, no model downloads, nothing to configure. If Manager reports the pack, one-click install is fine.

Gotchas

The randomize mode has the same beginner trap as its integer sibling: it can only pick from history, so on a fresh workflow with nothing executed yet, randomize has nothing to choose from. Run once with the values you want in the pool first.

And the pack-level caveat: comfyui-lf is legacy, frozen at its last stable release (Feb 2025), with development moved to lucafoscili/lf-nodes. The frozen build is perfectly stable - frozen means no regressions, too - but the history widgets have been rewritten in the new repo's LF Widgets library, so if you're starting fresh, that's where the good version lives.

Category✨ LF Nodes/Primitives

Inputs (5)

NameTypeDefaultDescription
floatFLOAT0.0Float value.
enable_historyBOOLEANtrueEnables history, saving the execution value and date of the widget.
randomizeBOOLEANfalseRandomly selects a previously used value (must be present in the history list).
seedINT42Seed to control the randomness when 'randomize' is active.
ui_widgetoptKUL_HISTORY[object Object]

Outputs (2)

NameTypeDescription
floatFLOAT
float_listFLOAT