Nodes/comfyui-AGSoft/🔢 AGSoft Loop Float
ComfyUI Node

🔢 AGSoft Loop Float

A float range generator that includes the end value, rounding and all

By Art-xmaster·Created 12 months ago·Updated a day ago· 23
🔢 AGSoft Loop Float
    • FLOAT
    start_at_step0.000
    end_at_step3.000
    jump1.000
    precision2

    AGSoft Loop Float generates a sequence of floats between a start and end value - with three things people actually care about in a float range: the end value is included, the step can be fractional, and you can control the decimal precision. It's the float counterpart to AGSoft Loop Integer, and it's the kind of node you grab when you want to sweep a parameter smoothly instead of guessing three values by hand.

    Float ranges are where naive loop logic falls apart. range() in Python can't do fractional steps, floating-point error turns 0.1 + 0.2 into a coin flip, and most "step through these values" tools quietly stop before the end value. This node solves all three. If you've ever tried to sweep CFG from 4.0 to 8.0 in 0.5 steps and gotten a list that ends at 7.5, you know exactly why this exists.

    How it works

    • start_at_step - first value (default 0). Can be negative, so descending sweeps are just start > end.
    • end_at_step - last value, and it is included. start=1.555, end=2.000, jump=0.222 gives you [1.555, 1.777, 2.000], per the node's own example.
    • jump - the step, and it can be fractional (min 0.001). Unlike the integer version, sub-unit steps are the whole point here.
    • precision - 1, 2, or 3 decimal places. The node rounds each value with proper half-up rounding rather than letting float error accumulate. Set precision to 1 and start=0.05 becomes 0.1; set 3 and you can walk values like 0.125 cleanly.

    Output: a single FLOAT list, ready to feed a loop sampler, a scheduler, or any list-driven node. The rounding is deliberate - an animation or CFG schedule with 0.30000000000000004 in it is a debugging nightmare, and this node just doesn't produce those.

    Installation

    From comfyui-AGSoft:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
    # restart ComfyUI
    

    Or via ComfyUI Manager (search "comfyui-AGSoft"). No models, no heavy deps.

    Where it fits

    Reach for it when you want a sweep - CFG scales, denoise ramps, LoRA strength walks - and let AGSoft Loop Fix Float handle the case where you want to hand-type specific values instead. The inclusive end is the feature to remember: most "range" utilities in this ecosystem stop one short of your target, and then your loop mysteriously never tests the value you actually wanted to test.

    CategoryAGSoft/Utility

    Inputs (4)

    NameTypeDefaultDescription
    start_at_stepFLOAT0.000-10000–10000Starting number of the sequence. Example: start=0.0, end=1.0, jump=0.3 → [0.0, 0.3, 0.6, 0.9] Начальное число последовательности. Пример: start=0.0, end=1.0, jump=0.3 → [0.0, 0.3, 0.6, 0.9]
    end_at_stepFLOAT3.000-10000–10000Ending number — this value IS included. Example: start=1.555, end=2.000, jump=0.222 → [1.555, 1.777, 2.000] (with 3 decimals) Конечное число — оно ВКЛЮЧАЕТСЯ. Пример: start=1.555, end=2.000, jump=0.222 → [1.555, 1.777, 2.000] (с 3 знаками)
    jumpFLOAT1.0000.001–1000Step size between numbers. Must be >0. Example: jump=0.125 → [0.000, 0.125, 0.250, ...] Шаг между числами. Должен быть >0. Пример: jump=0.125 → [0.000, 0.125, 0.250, ...]
    precisionCOMBO2Number of decimal places: 1 → 0.1, 2 → 0.01, 3 → 0.001. Example: precision=1, start=0.05 → becomes 0.1 Количество знаков после запятой: 1 → 0.1, 2 → 0.01, 3 → 0.001. Пример: precision=1, start=0.05 → станет 0.1

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT