Nodes/ComfyUI Easy Use/easy stringToFloatList
ComfyUI Node Runs on cloud

easy stringToFloatList

Easy stringToFloatList – ComfyUI Node Guide

By yolain·Created 3 years ago·Updated 12 days ago· 2,647
easy stringToFloatList
    • FLOAT
    string1, 2, 3

    If you've got a batch process that needs to sweep across a set of numbers - a series of CFG values, denoise strengths, LoRA weights, whatever - typing each one into its own node widget is tedious and doesn't scale. easy stringToFloatList takes the shortcut: type your numbers once as comma-separated text, and it parses them into FLOAT values you can feed into anything downstream built to consume a numeric list.

    How it works. One required input, string, a multiline text box that defaults to "1, 2, 3" - that default is a hint at the expected format: plain numbers separated by commas, spaces optional. It parses that text and produces a FLOAT output. This is the same category of node as easy stringToIntList (added alongside it in the pack's v1.3.6 update) - same idea, different numeric type, pick whichever matches what you're actually sweeping.

    Where you'd plug the output in. The obvious use is anything in Easy-Use's XY-Plot or for-loop system that wants a list of values to iterate - feed it a comma-separated string of denoise strengths, and each pass through the loop pulls the next one, instead of you manually creating a separate branch per value. It's also handy for a quick one-off: rather than hand-building five parallel nodes each with a hardcoded number, one easy stringToFloatList plus a loop covers the same ground with a single text field you can edit in five seconds.

    Negative numbers and decimals both work fine - "-0.5, 0, 0.5, 1.0" is a perfectly normal sweep for something like a conditioning-strength comparison, and there's no reason to limit yourself to whole numbers or positive values just because the default example ("1, 2, 3") happens to be simple integers dressed up as floats. That flexibility is really the whole reason this node is worth having over just typing five separate widgets: once your sweep needs uneven spacing (say 0.2, 0.5, 0.9, 1.0 instead of a clean linear range), a text field you can eyeball and edit in place beats five separate number boxes scattered across your canvas.

    Install. ComfyUI Manager, search "ComfyUI Easy Use," or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yolain/ComfyUI-Easy-Use
    

    then restart. Pure text parsing, no extra dependencies.

    Common issues. Malformed input is the whole risk surface here - stray characters, a trailing comma, or accidentally typing something that isn't a number (a unit label, a typo) will either throw a parse error or silently produce a shorter list than you expected, depending on how strict the parser is about the entry that failed. Keep the format boring: digits, commas, optional decimal points, nothing else. If a downstream loop runs fewer iterations than you expected, the first thing to check is whether your comma-separated string actually parsed to the number of values you think it did - a copy-paste that picked up an extra comma or a non-breaking space from another app is a classic, hard-to-see cause.

    CategoryEasyUse/Logic

    Inputs (1)

    NameTypeDefaultDescription
    stringSTRING1, 2, 3

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT