ComfyUI Node

Float Iterator

Sweep CFG, FreeU strength, or any float through a range in one run

By wakaura-asaho·Created 6 months ago·Updated 6 days ago· 1
Float Iterator
    • FLOAT
    initialization0.00
    condition10.00
    update0.50

    Want to know how an image changes as CFG goes from 4 to 10 in steps of 0.5? That's either eight manual runs - change, queue, change, queue - or one FloatIterator that hands each value to the KSampler and lets ComfyUI run the batch for you. This node is the float version of that idea: generate a list of values from a start to a stop, and ComfyUI fans the list out so everything downstream executes once per value.

    It's one of those nodes that quietly changes how you tune. The README's own examples point at the two classic uses: feed it into KSampler's CFG input to test behavior across CFG values in sequence, or into a model patcher like FreeU_V2 to sweep its strength parameter. Both are "which number makes this look best" questions, and both are exactly what a parameter sweep is for. If you've ever sat through a manual A/B loop, you already know why this exists.

    How it works

    Three inputs, and they read like a for loop because they are one:

    • initialization - the start value (default 0).
    • condition - the stop value (default 10).
    • update - the increment (default 0.5).

    The node builds the list from start to stop, stepping by the increment, and emits it as one FLOAT output that's marked as a list. The key part is what "list output" means in ComfyUI: the platform unpacks it, running your whole downstream chain once per value. You don't write a loop, you don't queue manually - you get one run per value automatically.

    Two guards make it actually usable. First, direction validation: if the increment is positive, start must be less than stop; negative, start must be greater. An increment of zero is rejected outright. This exists to stop you from creating an infinite list and, by extension, an infinite queue. Second, a precision guard: values are rounded to 10 decimal places as they accumulate, so 0.1 + 0.2 doesn't drift into 0.30000000000000004 and give you a 17-decimal surprise in your CFG.

    The inputs that matter

    • initialization, condition, update - that's the whole node. Set all three and go.

    Installing it

    No models, no heavy dependencies - this pack only requires a recent ComfyUI frontend. ComfyUI Manager → "Install via Git URL" → paste https://github.com/wakaura-asaho/comfyui-dynamic-selector → restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wakaura-asaho/comfyui-dynamic-selector
    # restart ComfyUI
    

    Gotchas

    The increment is where people burn themselves. Set update to something tiny over a wide range and you'll silently queue hundreds of generations - the guard stops infinite loops, not "annoyingly large" ones, so sanity-check your step before you hit queue. The example workflows in the repo also lean on ComfyUI's newer native Text Format node (0.24.1+), so if you open one and hit missing-node errors, update ComfyUI rather than blaming this pack. And like everything from this author so far, it's young and written for the new V3 node API (frontend >= 1.37.11), so keep ComfyUI current.

    CategoryWakaura

    Inputs (3)

    NameTypeDefaultDescription
    initializationFLOAT0.00-9999999–9999999
    conditionFLOAT10.00-9999999–9999999
    updateFLOAT0.50-9999999–9999999

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT