Seed Generator (Image Saver)
One seed for the sampler and the metadata, with an offset knob
- INT
A tiny node that outputs a seed as an integer - but with a purpose that fits the Image Saver pack's whole philosophy. The seed is the single most important number to get right in your metadata, because it's what lets anyone (including future you) reproduce the exact image. Seed Generator lets you define that seed once and wire it into both your KSampler and your Image Saver, so the number you generated with is provably the number recorded. No transcription, no drift.
The little increment field is the bonus: it nudges the seed by a fixed amount, handy for stepping through variations in a controlled way.
How it works
You set a base seed and an increment. The node adds them and outputs a single INT. Feed that INT to your sampler's seed input and to the saver's seed_value, and the two are locked together by construction. Because increment can be negative as well as positive, you can walk seeds forward or backward from a reference - useful when you've found a seed you like and want to probe the ones right next to it.
Why the seed matters this much: it's the one number that, held fixed alongside the same model and settings, reproduces an image exactly. That's the entire promise of the metadata this pack writes - someone should be able to read the seed off your upload and regenerate it. A seed that's recorded wrong is worse than none, because it looks trustworthy and isn't. Sourcing it from one node kills that failure mode outright.
The inputs and outputs that matter
- seed - the base value.
- increment - an offset added to the base (can be negative). Leave it at 0 to pass the seed straight through.
The single output is an INT - route it to the KSampler and to the saver so both see the identical seed.
Installing it
ComfyUI Manager: search ComfyUI Image Saver, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/alexopus/ComfyUI-Image-Saver
cd ComfyUI-Image-Saver
pip install -r requirements.txt
Restart and hard-refresh. Nothing to download.
Where people get tripped up
Don't confuse this with the "randomize each run" behaviour of a KSampler's own seed control. Seed Generator gives you a fixed, explicit seed (plus offset) - great for reproducibility and metadata accuracy, but it won't roll a new random number on its own the way a KSampler set to "randomize" does. If you want fresh seeds every run, you'll drive the base from ComfyUI's own seed randomization or a control-after-generate widget, and let this node apply the offset.
The other thing: the point is only served if you wire the output to both consumers. Send it to the sampler alone and the saver still needs to be told the seed separately - which reintroduces exactly the copy-paste error this node exists to prevent. One INT, two destinations.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | The random seed used for creating the noise. |
| increment | INT | 0-18446744073709550000–18446744073709550000 | number to add to the final seed value |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | seed (INT) |