Range (Yogurt Nodes)
A Range Node for LoRA Sweeps and Batch Runs
- range
- count
- step
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 fromcountinstead.count- number of values. 0 means "unlimited", i.e. derive the count fromstep.
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.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| from | FLOAT | 0.00 | start value |
| to | FLOAT | 1.00 | end value |
| step | FLOAT | 0.00 | step size, 0 means unlimited |
| count | INT | 0 | number of steps, 0 means unlimited |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| range | RANGE | — |
| count | INT | — |
| step | FLOAT | — |