Seed: Controlling randomness deterministically
Pin the random noise to reproduce identical outputs or create controlled variations from the same starting point.
Introduction
The seed parameter provides a deterministic starting point for the pseudo-random processes in AI generation. When you supply the same seed with the same parameters, the model produces identical output every time.
In diffusion models, the seed determines the initial noise pattern from which the output is gradually refined. In other architectures (autoregressive video models, music generation), the seed initializes the random number generator that drives the model's sampling process. The underlying mechanism varies, but the effect is consistent: a fixed seed means reproducible output.
Seed is one of the few parameters that works across nearly every modality on the platform. Image, video, 3D, and music models all accept a seed parameter.
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
A massive sci-fi space battle with starships firing lasers across a backdrop of colorful nebulae, asteroids drifting between the chaos
Request structure
The seed parameter is an integer passed at the top level of your generation request. It works identically across task types.
[
{
"taskType": "imageInference",
"model": "runware:101@1",
"positivePrompt": "A massive sci-fi space battle with starships",
"seed": 42,
"steps": 30,
"width": 1024,
"height": 1024
}
]If you don't specify a seed, a random one is generated in the unsigned 64-bit range. The response object always includes the seed that was used, so you can capture it for future use.
Why seeds matter
Seeds are foundational for three common workflows:
Reproducibility. The same seed, prompt, and parameters produce identical output. This is critical for production pipelines where you need to guarantee that a previously approved result can be recreated exactly.
Controlled experimentation. Fix a seed, then change one parameter at a time (CFG scale, scheduler, prompt wording) to isolate its effect. Without a fixed seed, you can't tell whether a visual change came from your parameter adjustment or from a different random initialization.
Iterative refinement. Generate a batch of outputs, find a composition you like, then record that seed. Use it as your starting point while you fine-tune the prompt, adjust weights, or swap LoRAs. The overall structure stays stable while you dial in the details.
Seed behavior across architectures
Seed behavior is not perfectly uniform across all models. There are two things to be aware of:
- Same seed, different model: Two different models given the same seed will produce completely different output. The seed initializes the noise, but each model interprets that noise through its own architecture.
- Not all models support seed: Third-party models like Recraft, Ideogram, Kling, and Luma do not expose a
seedparameter. If reproducibility is important for your workflow, verify that your model's schema includes seed support before relying on it.
Stochastic schedulers (like Euler Ancestral or DPM++ SDE variants) introduce randomness at each denoising step, which means even a fixed seed will produce slightly different results between runs. If exact reproducibility matters, use a deterministic scheduler like DPM++ 2M Karras or DDIM.
Tips
- Always log seeds in production. Even if you don't set a seed explicitly, the response includes the one that was used. Store it alongside the output so you can reproduce or iterate on any result later.
- Use seed sweeps to explore. Generate the same prompt with 10-20 different seeds to survey the model's output space. Pick the best composition, then lock that seed for refinement.
- Batch with sequential seeds. When generating a batch, use sequential seeds (42, 43, 44...) rather than random ones. This makes it easy to reproduce any specific output from the batch.
- Combine seed with CFG sweeps. Fix a seed and sweep CFG scale from low to high. This shows you the full range of prompt adherence for a single composition, which is the fastest way to find your ideal settings.