Seed List (YC)
Give every iteration of a loop its own seed — deterministic batch variety
- seed
- total
The seed problem in ComfyUI batch workflows: a KSampler with a fixed seed gives you the same image on every pass, so a loop that should produce variation produces copies. This node generates a list of seeds up front - random, incrementing, or decrementing - so each iteration of your loop pulls a different value, deterministically. The description in the pack says it plainly: it's for use in a for loop, picking a distinct seed per iteration.
What it's actually for
Batch variety with control. You're running a workflow that loops over prompts, LoRAs, or whatever, and you want each iteration to sample differently - but you also want the whole run reproducible. This node hands you that: give it a seed to seed the RNG, and it emits a reproducible list of total seeds. Feed each one into the sampler per iteration and every pass samples fresh, with the whole run replayable.
How it works
It calls Python's random.seed(seed) once, then generates total values:
- random - a
randint(min_num, max_num)per item (the common choice) - increment -
min_num,min_num+1, … capped atmax_num - decrement -
max_numdownward, floored atmin_num
The seed output is a list of total integers - the node says INT, but it returns a sequence, and the loop picks one per iteration (pair it with an index node; the author's description mentions easy's indexAny for exactly this). The total output just echoes your count so downstream nodes know how many iterations to run. IS_CHANGED is keyed off the seed, so the node re-evaluates when the seed changes and stays put when it doesn't - your run is reproducible, not chaotic.
Inputs and outputs
- min_num / max_num - the range seeds are drawn from (huge upper bound, so effectively unbounded)
- method - random / increment / decrement
- total - how many seeds to generate (1–100000)
- seed - the RNG seed that makes it all reproducible
Outputs: seed (the list - index into it per iteration) and total.
Install
In ComfyUI-YCNodes. ComfyUI Manager → search "ComfyUI-YCNodes" → install, restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-YCNodes
Standard deps (torch, numpy, pillow, opencv-python, scipy), no models.
Where people get burned
- Thinking the seed output is a single int. It's a list. Wire it into an index node inside your loop, or you'll feed a list where a KSampler wants an integer and get a type error.
- Forgetting it's deterministic. Same
seed+ same params = same list, every run. That's a feature for reproducibility - but if your loop "never changes," check that you're actually consuming a different item per iteration. - Swapped min/max. If
min_num > max_num, the node swaps them for you - nice safety, but it can mask a bug where your intended range never gets used.
It's a small node that quietly solves a classic annoyance: consistent batch variety in loop workflows, with the numbers you'd expect on every replay.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| min_num | INT | 00–1125899906842624 | — |
| max_num | INT | 1125899906842624 | — |
| method | COMBO | random | 3 options: random, increment, decrement |
| total | INT | 11–100000 | — |
| seed | INT | 00–1125899906842624 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| seed | INT | — |
| total | INT | — |