5 2 votes
Article Rating
stable diffusion,parameters

Sampling steps

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. Increase when you believe the quality is low.

Of course, it’s all subjective, and we leave the final decision on how many steps to use to you – the creator.

CFG Scale

Simply put, the guidance scale (sometimes referred as cfg – classifier free guidance) is a parameter that controls how much the image generation process follows the text prompt. The higher the value, the more image sticks to a given text input.

But this does not mean that the value should always be set to maximum, as more guidance means less diversity and quality.

Recommendation: Use the default guidance scale value of 7. Increase when the generated image does not follow the prompt. Stay away from extremes of 1 and 30.

Negative Prompts

The negative prompt is a parameter that tells Stable Diffusion what you don’t want to see in the generated images. When specified, it guides the generation process not to include things in the image according to a given text.

A negative prompt may prevent generating specific things, styles or fix some image abnormalities.

Seed

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.


Chris

Chris

Just me, need more info?

5 2 votes
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
NIna
NIna
2 years ago

Great tips, thanks

1
0
Would love your thoughts, please comment.x
()
x