Seed Shifter 988
A batch of reproducible seeds from one base number
- seeds
Seed discipline is half of reproducible generation, and the default ComfyUI seed widget is terrible at batch work: it randomizes one number at a time, and if you want to run eight variations you're either clicking "randomize" eight times or hand-typing a ladder. Seed Shifter 988 turns one base seed into a whole batch of deterministic seeds, each one base + offset + index. Same run, same seeds, every time.
That reproducibility is the whole selling point. The KB's plumbing essay spends real words on how seed handling bites people - the control_after_generate trap, the good-seed-you-lost problem - and this node sidesteps a lot of it by making the batch computed rather than generated: the seeds are a pure function of three numbers, so nothing about them depends on what the UI did last run.
How it works
Three inputs, one formula:
seed(default 0) - your base seed. Anything reproducible downstream flows from this.seed_shifter(default 0) - a constant offset added to every seed in the batch.batch(default 1) - how many seeds to produce.
Each seed is seed + seed_shifter + index, for index 0 through batch−1. So with seed=100, seed_shifter=50, batch=3 you get 150, 151, 152. Bump seed_shifter and the whole batch moves at once; keep it and every index is stable across runs.
The single output is seeds - a list of INTs. Wire it into a node that consumes a list (a batch sampler, or a loop) and you've got per-item seeds without any randomization node in the graph.
Why you'd reach for it
Batch exploration, done deliberately. You want to sweep the same prompt across a set of seeds and keep each one attributable: seed k always maps to a known number, so when image #5 is the keeper you know its seed without digging. It's also the clean way to add reproducible variation to a workflow that otherwise has a single seed floating around - one seed widget upstream, and a shifter feeding the batch.
Gotchas
- It produces a list, not a scalar. If you wire it into a plain KSampler seed input expecting a single int, you'll either get a type mismatch or it'll collapse to the first item. Use it where a batch/list of seeds is consumed.
- The formula is trivial - which is the feature. If you need randomized but recorded seeds, this isn't it; that's what the built-in randomize does (and loses). If you need deterministic batches, this is exactly it.
seed_shifterhas no upper bound in the schema, so keep it sane; ComfyUI's seed range tops out around 2^64.
Install
Part of ComfyUI-988: Manager (search "ComfyUI-988") or:
cd ComfyUI/custom_nodes
git clone https://github.com/kajan988/ComfyUI-988
cd ComfyUI-988
pip install -r requirements.txt
Then restart. Pure integer arithmetic - nothing to download.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | — |
| seed_shifter | INT | 0 | — |
| batch | INT | 1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| seeds | INT | List of batch seeds |