Guide to using seed in Stable Diffusion

What is a seed in stable diffusion, and how to use it?

Seed in Stable Diffusion is a number used to initialize the generation. No need to come up with the number yourself, as it is randomly generated when not specified. But controlling the seed can help you generate reproducible images, experiment with other parameters, or prompt variations.

The most important thing about seed is that generations with the same parameters, prompt, and seed will produce precisely the same images. Thanks to that, we can generate multiple similar variations of the picture. Let's look up some examples.

With this base prompt: 'portrait of a girl'  and seed of 2229135949491605, we can modify generated images by changing words in prompts.

Base promptwith 'Smiling'with 'Angry'with 'Excited'

As we see, adding just one more word which defines emotion changes her facial expression while maintaining the rest of the visual features like hair, clothes, and background.

We can take it further and use the same seed value to change the look of the whole image. So, for example, we can generate a 'park' during each of the four seasons.

'spring''summer''autumn''winter'

Or create the same painting of Elon Musk made by different artists.

by Vincent van Goghby Pablo Picassoby Salvador Dalíby Wassily Kandinsky

Prompt is one of many parameters you can modify to generate image variations. See our guides for steps, guidance scale, and negative prompts for more examples.