Interactive guide to Stable Diffusion steps parameter

How to adjust inference/sampling steps in Stable Diffusion

Generally speaking, the more steps you use, the better quality you'll achieve. But you shouldn't set steps as high as possible. It's all about the results you are trying to achieve.

First, let's briefly introduce the steps parameter in Stable Diffusion and diffusion models in general. Diffusion models are iterative processes – a repeated cycle that starts with a random noise generated from text input. With each step, some noise is removed, resulting in a higher-quality image over time. The repetition stops when the desired number of steps completes.

Around 25 sampling steps are usually enough to achieve high-quality images. Using more may produce a slightly different picture, but not necessarily better quality. In addition, the iterative nature of the process makes generation slow; the more steps you'll use, the more time it will take to generate an image. In most cases, it's not worth the additional wait time.

Recommendation: Use 25 steps set by default in tools. Increase when you believe the quality is low.

Below you can see single steps (1-100) used to generate a picture of the 'puppy in space'. Drag the slider to move between steps, starting with noise at step 1.

Note how the magic happens around steps 4-7, and the dog emerges from the blob. Then it reaches high quality around 20-25 steps into the generation. Steps above 25 do not create a significant difference in quality; the dog's form repeatedly changes without producing more details.

Here's another example showcasing different 'a bear astronauts' at different steps. Move slider to change to a different set.

Steps: 20Steps: 30Steps: 60Steps: 120

Notice that with higher steps, the main form of a 'bear in NASA suit' stays the same. But in this case, some minor details are more pleasing with more steps. For example, the bear looks more 'hairy', the colors are a little more vibrant, and the logos/devices on the NASA suit are more intricate.

Of course, it's all subjective, and we leave the final decision on how many steps to use to you - the creator. We hope our guide helped you understand steps parameter in Stable Diffusion generation process, and you'll use what you've learned to create something unique.