Nodes/Comfy_KepListStuff/Range(Step) - Float
ComfyUI Node

Range(Step) - Float

Float sweeps that don't drift into ugly decimals

By M1kep·Created 3 years ago·Updated 2 years ago· 56
Range(Step) - Float
    • range
    • range_sizes
    start0
    stop0
    step0
    end_modeInclusive

    Range(Step) - Float generates a list of floats from start to stop, stepping by step, and it's the node you reach for when you want a CFG sweep or a denoise ladder without hand-typing 5.5, 6.0, 6.5…. It's the step-based counterpart to Range(Num Steps) - Float: that one asks how many values you want, this one asks how far apart they should be.

    Inputs are start, stop, step (all FLOAT) and end_mode (Inclusive default / Exclusive). Outputs are range (your list of floats) and range_sizes (per-run lengths when you feed multiple starts/stops as lists). Inclusive means the endpoint is included - 0.0 to 1.0 by 0.1 gives eleven values, 0.0 through 1.0 - while Exclusive stops just short.

    The detail that makes this node worth picking over doing it in your head: it computes in Python's Decimal, not binary floats. Naive float math drifts - 0.1 + 0.2 isn't quite 0.3 in binary - and a long sweep accumulates that error into entries like 0.6000000000000001. This node does its stepping in Decimal and converts to float on output, so your CFG axis comes out clean. It's a small thing until you've spent an evening squinting at a grid label that says 7.999999999999999.

    The trap mirrors the int version of this node and it's the one thing to remember: the default step is 0. A zero step is nonsense for a range - and worse than a clean error, it can hang the node depending on your start/stop values. Set a real, nonzero step before you queue. Nonzero, and this thing behaves like a well-mannered utility.

    It's list-aware like everything else in the pack: feed lists of starts, stops, and steps and it builds multiple concatenated sweeps, with range_sizes telling you where each segment begins and ends - exactly the info a grid assembler like XYImage needs to slice the results back into rows. That's its natural home: the numeric axis of an XY plot, paired with the pack's string lists on the other axis.

    Install is the standard pack one-liner with nothing extra to install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/M1kep/Comfy_KepListStuff
    

    Restart ComfyUI or install Comfy_KepListStuff via Manager, then look under List Stuff. Set a nonzero step, and sweep clean.

    CategoryList Stuff

    Inputs (4)

    NameTypeDefaultDescription
    startFLOAT0-4096–4096
    stopFLOAT0-4096–4096
    stepFLOAT0-4096–4096
    end_modeCOMBOInclusive2 options: Inclusive, Exclusive

    Outputs (2)

    NameTypeDescription
    rangeFLOAT
    range_sizesINT