create LIST from FLOATs
Create LIST from FLOATs — decimals in, decimals out, no cast drama
- LIST
Samplers, scales, strengths, CFG values - the numbers that actually tune a generation are almost all floats. When you want a list of them, create LIST from FLOATs is the typed convenience version: same growing set of item_N slots as the generic create LIST, but every slot is typed as FLOAT and coerced with float() before it's stored. Handy when a workflow wants to try a batch of scale = 5.0, 5.5, 6.0, ... and hand the whole set to something that iterates them.
How it works
Each item passes through float():
values = [float(value) for value in list(kwargs.values())[:-1]]
Integers coerce cleanly - 5 becomes 5.0. Strings that look like numbers work too ("2.5" → 2.5), which can quietly rescue you from a value that arrived as text. Anything genuinely non-numeric raises an error, which is the typed list doing its job. The trailing empty slot is dropped like every create-node in the family, so an empty string can't be your last element.
Output is a single LIST of floats - directly comparable, sortable, and summable by the pack's list-operation nodes.
Where you'd use it
- Parameter sweeps. Build a list of scales, denoise strengths, or weights to iterate through.
- Numeric lists for
ListMax/ListMin/ListSort/ListSum- all of which expect comparable values. - Clean data for comparisons. Feed a list of floats into
<=or>=checks viaget itemwhen you need to threshold each one.
Installing
Part of the "Basic data handling" pack by StableLlama. ComfyUI Manager: search "Basic data handling", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
Restart ComfyUI. Zero dependencies, no models - pure Python, and one of the simplest installs in the ComfyUI ecosystem.
Gotchas worth knowing
float()accepts numeric strings, so"2.5"silently becomes2.5. If that surprises you in a data flow, that's why.- Anything else non-numeric errors out rather than guessing.
- Trailing empty slot is dropped; and as with the whole pack, this produces a LIST (single Python list variable), not a native data list.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| item_0opt | FLOAT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LIST | LIST | — |