What is CFG Scale in Stable Diffusion? Here is How You can Use it for Best Results

Ever heard of the CFG scale and wondered what is CFG scale in Stable Diffusion? Keep on reading to find out!

Stable Diffusion has recently been a very popular text-to-image AI model which leaves its users in surprise with its image generative capabilities. The benefit Stable Diffusion has is, it is open source and available to use with 1000+ models for anyone. This means you can install and run Stable Diffusion on your own machine.

Classifier-free guidance (CFG) scale in Stable Diffusion is another feature that makes it stand out of its competitive AI models. And that is today’s topic as well. In this article, we will be discovering what is CFG scale in Stable Diffusion, how it works, how you can use it to improve your experience with Stable Diffusion, and more! So let’s not wait any further.

 

What is CFG Scale in Stable Diffusion?

Classifier-Free Guidance scale or CFG scale is a parameter that determines the degree of similarity between user input and the generated image. Using the CFG scale, users can tweak the level of similarity, and the quality of generated image.

 

What is CFG Scale Stable Diffusion Meaning?

If you are still wondering what is CFG scale in Stable Diffusion, here is your answer. The simple CFG Scale Stable Diffusion meaning is, your generated images will be compared to the prompt you provided. The higher the CFG Scale will be, the more generated image will match your input. However, in that case, the quality of the image may be compromised.

For better-quality images, the CFG scale may be kept lower. But that may lead to decreased resemblance between the prompt and the generated image. It’s totally up to you. If you want the output to be more aligned with the input, you can choose a higher CFG scale. If you care about the quality and the resemblance doesn’t matter to you, you can go for a low CFG scale.

 

How to Use CFG Scale in Stable Diffusion

Here are some simple steps you can follow to use the CFG scale in Stable Diffusion

Choose your Platform

You can use the CFG scale on platforms like DreamStudio, Playground AI, or Lexica. Decide where you want to use the CFG scale.

 

Sign up or Log in

For DreamStudio or Playground AI, you will need to Sign up or log in. If you are using Lexica, you are good to go.

Enter your prompt.

Now you have to put in your imaginative prompt to get output from Stable Diffusion. If you are unsure about how to craft good prompts, here is a guide for you.

Locate CFG Scale

According to the platform you are using, you will need to locate the CFG scale.

In DreamStudio you can find the “CFG Scale” slider on the right-hand side.

What is CFG Scale in Stable Diffusion

 

For Playground AI, you will find CFG Scale as “Prompt Guidance” on the right-hand side.

What is CFG Scale in Stable Diffusion

 

For Lexica, you will find CFG Scale as a “Guidance Scale” after clicking the “Generate” button.

What is CFG Scale in Stable Diffusion

 

Adjust the CFG Scale

The next step is to adjust the CFG scale value according to your preferences. As discussed earlier, you can use a high CFG scale value for more resemblance of the prompt and output, while compromising on the quality, and vice versa.

 

Generate the Image

Once you have set the scale as per your preferences, you can generate the image. You will find the button to generate the image according to the platform you are using. It can be “Generate”, “Dream” or anything else.

 

What is the best CFG Scale Value?

The best CFG scale value depends on your requirements. However, the optimum value is said to be around 7 to 11. You can set the value according to your preferences.

 

Conclusion

Stable Diffusion is one of the most popular text-to-image AI models which comes with some extra and handy features. One of these features is the CFG scale. In this article, we talked about what is CFG scale in Stable Diffusion, how it works, and how you can use it for the best results for your images.

 

Scroll to Top