AIGenerative AIDiffusion1 min read

Seeds and Image Editing, Explained

Image generators have a few settings that confuse almost everyone at first: the seed, and when you edit a picture, the strength. Both make sense once you remember how these models work. They start from noise and clean it up step by step, and these settings decide which noise, and how much of it.

The noise at the start is random, but computers make random numbers with a recipe that starts from a single number: the seed. The same seed gives the same noise, and the same noise with the same settings gives the same picture, or very nearly the same, since tiny differences can come from the hardware. A new seed means new noise and a new picture. Try both settings.

Interactive
Seed
Prompt
Prompt: a red fox sitting in fresh snow, watercolor painting

Keep the seed and change the animal: the layout, the background and often the pose stay. Keep the animal and change the seed: you get a different picture.

Real pictures made with Stable Diffusion XL (fast-sdxl on fal.ai): guidance scale 7, 25 steps. Only the seed and one word of the prompt change.

The starting noise already nudges the rough layout in one direction, so the same seed often keeps the composition even when you swap the animal. That is useful in practice: when you like a picture, keep its seed and adjust the prompt.

What if you already have a picture and want to change it? Image-to-image does something clever. It adds noise to your picture, but not all the way, and then cleans it up again with your new prompt. How much noise is added is the strength: at 0 nothing is added, at 1 the picture is completely buried. Let's try it in our tiny world first, starting from one dot on the heart and editing it 300 times with different noise.

Interactive
Stayed close to the start
142 / 300
Ended on another shape
0 / 300
Low strength: a little noise is added, so most edits end right next to the starting dot. The picture barely changes.

The white circle is the starting dot on the heart. Each of the 300 edits adds different noise up to the chosen strength and cleans it up again with the exact best guesses. A dot counts as "close to the start" within 0.25 units.

With a little noise, every edit ends near where it started. With more, the edits wander further, until at 1 the starting picture no longer matters at all. This is the trade you make with every edit: keep more of the original, or give the model more freedom.

Here is the same setting on a real picture: a lighthouse at sunset, with a prompt that asks for a snowy winter night.

Interactive
Prompt: a lighthouse on a rocky cliff on a snowy winter night, oil painting
The starting picture: a lighthouse at sunset.

Real pictures made with Stable Diffusion XL image-to-image (fast-sdxl on fal.ai): the same starting picture, prompt and seed, guidance scale 7, 30 steps. Only the strength changes.

Low strength keeps the picture but cannot make the change. High strength makes the change but forgets the picture. The useful value is usually somewhere in between, and it depends on how big a change you want.

Sometimes you only want to change one part of a picture. Inpainting does that with a mask: only the area inside the mask is filled with noise and repainted, while the model keeps looking at the rest of the picture, so the new part fits in. Pick something to paint in the sky.

Interactive
The dashed box marks the area to repaint. Everything outside it stays.

Real pictures made with Stable Diffusion XL inpainting (fast-sdxl on fal.ai). Outside the box, the pixels changed by only about 1% on average, most likely a side effect of passing the picture through the latent space. The moon took a few tries with different seeds; the first ones came out faint.

Seeds, strength and masks are the idea from the first article in different clothes: where the noise starts, how much noise you add, and which parts you let the model change.

One common mix-up: a seed is not a style, and it does not store a picture. It is only the recipe for the starting noise, so the same seed in a different model, or at a different size, gives a completely different picture. A seed is only reproducible together with everything else: the same model, the same prompt and the same settings.


If this content helped you, you can buy me a coffee.
RelatedHow AI Turns Noise into Images
RelatedStable Diffusion Prompt Guide

You can join the newsletter to be notified of awesome interactive articles and courses about AI, software and design. You will receive at most a few emails per month.

Join 800+ curious readers.


Join our Supporters