Stable Diffusion starts with an image that consists of random noise. Then it continously denoises this image over and over again to steer it to the direction of your prompt. Inference steps controls how many steps will be taken during this process. The higher the value, the more steps that are taken to produce the image (also more time).
Although it is sometimes seen as a “quality slider” it’s not necessarily that. Because after a certain number of steps, certain models in certain configurations will start introducing details that you might not like. The sweet spot for speed vs quality differs for each scheduler but 30 is usually a good starting point to experiment.
Inference Steps Examples
Here is the same generation created at 5, 10, 20, 30, 40 and 50 inference steps.
Inference Steps 5
Inference Steps 10
Inference Steps 20
Inference Steps 30
Inference Steps 40
Inference Steps 50
As you can see the image lacks detail at 5 and 10 steps but around 30 steps, detail is good. Although it can change from example to example and from scheduler to scheduler, we prefer 40 steps in this example because the extra detailed added at 50 steps made the image less pleasing to our eyes (it also took more time). This is why inference steps is not necessarily a “quality” slider.