Seed

last edited

A seed is the value that initializes the pseudo-random number generator behind a generation's starting noise. Fixing it makes runs repeatable on the same software and hardware, which turns a slot-machine medium into one that supports controlled comparison. Reproducibility is not guaranteed across platforms. The Diffusers docs prefer passing a `torch.Generator` object over a bare integer.

Practice

Holding the seed fixed while varying one thing at a time is the basic experimental method. Sweep CFG values, swap samplers, change one prompt word, or toggle a LoRA on and off. Artists keep seed libraries of noise patterns that give good compositions for a given model and resolution.

Seed hunting means running cheap low-step batches and rendering only the best candidates at full quality.

Limits

The seed does not fix everything. Pipelines also draw random noise during scheduling steps, so the starting tensor is only one source of randomness. The Diffusers docs state that exact results cannot be expected across platforms. GPU output can differ from CPU output even with an identical seed. A seed also means nothing across different models or resolutions. PyTorch documents its own randomness limits in its reproducibility notes.

Variation

Neighboring seeds give sibling compositions for curation. These feed the pick-and-refine img2img loop that most finished pieces pass through. See core techniques for related workflows.

The denoising process itself is historically grounded in the DDPM paper. Newer pipelines often use flow matching instead, but seeded noise plays the same starting role.

Sources