Create Range
Generate sequential seeds and indexes with Python's range()
- INT
- PYLIST
- length
Want ten sequential seeds instead of ten random ones? Or a clean 0-through-N index list to drive a List: Get By Index chain? Create Range wraps Python's range(start, stop, step) in a node, and it's the README's own pick for the job: "useful for seeds and indexes." No text box, no manual typing of ten numbers - three integer fields and you're done.
How it works
It's exactly range(). Set start, stop, and step, and it generates the same sequence Python would: starting at start, incrementing by step, and stopping before it reaches stop. So Create Range(0, 10, 1) gives you ten integers, 0 through 9 - 10 itself is never included, same as Python's own off-by-one convention. Set step to a negative number and it counts down instead, exactly like range() does.
The most common use is wiring the result straight into a KSampler's seed input through a List connection: ten sequential seeds means ten runs, each with a different, predictable seed, so you can eyeball variation across a batch without relying on random seed generation. It's also handy purely as an index generator - feed it into List: Get By Index on something else if you want to walk through items in a controlled order rather than by hand.
The inputs and outputs that matter
start(default 0) - first integer generated.stop(default 1) - the boundary. Not included in the output, matching Python'srange()exactly.step(default 1) - increment between values. Negative steps count down.
Three outputs: INT as a ComfyUI List (is_list: true) - this is what you wire into a seed or index input for per-item execution - PYLIST, the same integers as one raw Python array, and length, the count of how many integers came out, which is a quick sanity check that your start/stop/step actually produced what you expected.
How to install it
Through ComfyUI Manager: search "ComfyUI-List-Utils" and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/godmt/ComfyUI-List-Utils.git
Restart ComfyUI afterward. No model downloads, no external dependencies - it's Python's built-in range() with a UI on top.
Common issues & troubleshooting
Got one fewer value than expected. This is the exclusive-stop behavior. Want seeds 0 through 10 inclusive, eleven values total? stop needs to be 11, not 10. It's the same convention as Python's range() and as this pack's other slicing nodes, so once you internalize it here it applies everywhere in the pack.
Empty output, no error. If start and stop are set such that the sequence can never move toward stop given the sign of step - say start=0, stop=10, step=-1 - range() just produces nothing. No crash, no items, length comes back 0. Check that your step's sign actually points from start toward stop.
Wanted evenly spaced decimal values instead of consecutive integers. Create Range is integers only. For floats with a fixed step, use Create Arange; for an exact count of evenly spaced values including both endpoints, use Create Linspace.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| start | INT | 0-9007199254740992–9007199254740992 | First integer to generate. |
| stop | INT | 1-9007199254740992–9007199254740992 | Stop boundary. This value is not included. |
| step | INT | 1-9007199254740992–9007199254740992 | Increment between values, matching Python range(). |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| INT | INT | Generated integers as a ComfyUI List-processing output. |
| PYLIST | PYLIST | Generated integers as one Python list value. |
| length | INT | Number of generated items. |