Stable Diffusion Parameters

Inference Steps

Stable Diffusion starts with a picture made of random noise. It then cleans up this noise bit by bit, moving the picture towards your prompt. The 'Inference Steps' decide how many steps are taken during this clean-up. The bigger the number, the more steps it takes to make the picture, which also means it takes more time.

Think of inference steps not as a "quality slider", but more like a "detail control". After a certain point, taking more steps might add details you don't necessarily want. The perfect balance between speed and quality differs for each scheduler, but starting with 30 steps is usually a good idea.

Inference Steps Example

Let's look at an image created with 5, 10, 20, 30, 40, and 50 inference steps. You'll notice the image lacks detail at 5 and 10 steps, but around 30 steps, the detail starts to look good. In this example, we liked the result at 40 steps best, finding the extra detail at 50 steps less appealing (and more time-consuming). So, remember, inference steps aren't strictly about quality.

Guidance Scale

The guidance scale helps you control how closely your generated image will resemble your prompt. A higher guidance scale means the model will stick closely to your prompt, while a lower scale gives the model more creative freedom. You can think of the guidance scale as "prompt strength". A stronger prompt leaves less room for creativity. Most Stable Diffusion models default to a guidance scale of around 7-7.5. In our example, we're using 7 with Stablecog.

Guidance Scale Example

Here's an image generated with guidance scales of 1, 3, 7, and 15. The prompt was: "Dark, moody, high contrast, an alien with a tomato head".

Scheduler

The scheduler oversees the entire image generation (or diffusion) process. It's often a trade-off between speed and quality. Some schedulers might produce more creative results, some might excel at small details, and some might be great at fewer inference steps without sacrificing quality. There's no one-size-fits-all "best" scheduler—it all depends on what you're aiming to create. Euler is a reliable standard, Euler Ancestral tends to be more creative with higher inference steps, and DPM Multistep is excellent for fine details.

Scheduler Examples

Take a look at four images below, each created with different schedulers but identical settings otherwise. You'll notice some yield similar results, while others vary significantly.

Seed

A seed is like a unique fingerprint for initializing the random number generator that creates your image. It's a neat feature allowing you to replicate the exact same result when needed. If all other settings are equal, using the same seed will give you the same image, while a different seed will result in a different image. While not a common use case, seeds can be useful when comparing different settings. For instance, you can use the same seed with two different models or schedulers and directly compare the results.

Seed Examples

Below are two images with identical settings, except for the seed. The image on the left uses seed 415798970, and the one on the right uses seed 1000097042. Notice how a different seed results in a completely unique image. Keep these seeds handy, as you can use them later to recreate these exact images.