Nodes/ComfyUI-YogurtNodes/Range (Yogurt Nodes)
ComfyUI Node

Range (Yogurt Nodes)

A Range Node for LoRA Sweeps and Batch Runs

By yogurt7771·Created 2 years ago·Updated 4 days ago· 1
Range (Yogurt Nodes)
    • range
    • count
    • step
    from0.00
    to1.00
    step0.00
    count0

    If you've ever wanted to test a LoRA at strengths 0.5, 0.6, 0.7, 0.8, and 0.9 without editing the node between runs, YogurtRange is the node that makes that a loop instead of a chore. It generates a numeric range - exactly like Python's range(), but with floats - and hands it to anything downstream that will iterate over a batch.

    The four inputs are the obvious ones:

    • from - start value (default 0).
    • to - end value (default 1).
    • step - step size. 0 means "unlimited", i.e. derive the step from count instead.
    • count - number of values. 0 means "unlimited", i.e. derive the count from step.

    The trick is that step and count are mutually exclusive: set one to 0 and the node computes the other. Want exactly five evenly spaced values from 0 to 1 regardless of what step that implies? Set count to 5 and leave step at 0. Want every 0.1 from 0 to 1? Set step to 0.1 and leave count at 0. That covers both mental models and it's why the node earns its place.

    What comes out

    Three outputs: range (the RANGE value itself), plus count and step as plain numbers. That last pair is the sneaky-useful part - you can feed the computed step or count into other logic instead of hardcoding it. The RANGE type is this pack's own, so you'll typically feed it straight into another Yogurt node (YogurtRangeItem is the natural partner - it plucks a single value out by index).

    The practical loop

    The classic setup is a strength sweep: YogurtRange feeding a value that drives a LoRA stacker's strength, with a batch run on top. Each iteration pulls the next value from the range, and you end up with five images showing the same prompt at five strengths. It's the same idea as the detail-pass automation philosophy that made packs like Impact Pack famous - automate the repetition so you only think once.

    Install

    It ships in ComfyUI-YogurtNodes. ComfyUI Manager → search ComfyUI-YogurtNodes → install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
    cd ComfyUI-YogurtNodes
    pip install -r requirements.txt
    

    Restart ComfyUI. Nothing extra to download - it's pure math, no models, no keys.

    One thing to watch: the to value is inclusive-ish in practice but it's a floating point range, so you might land on 0.9000000001 instead of 0.9 depending on your step. If you're feeding the output into something that compares with ==, round it somewhere in the chain. For strengths and seeds nobody notices; for exact-match logic they do.

    CategoryYogurtNodes/Number

    Inputs (4)

    NameTypeDefaultDescription
    fromFLOAT0.00start value
    toFLOAT1.00end value
    stepFLOAT0.00step size, 0 means unlimited
    countINT0number of steps, 0 means unlimited

    Outputs (3)

    NameTypeDescription
    rangeRANGE
    countINT
    stepFLOAT