Start Creating AI Art on NightCafe Now →

Create jaw-dropping art in seconds with AI

This is the most fun I've had on the internet in a long long time

u/DocJawbone on Reddit

Fun Fast Free

What Is Guidance Scale Stable Diffusion?

Guidance scale Stable Diffusion, or classifier-free guidance scale (CFG), is a parameter used in artificial intelligence (AI) to determine how much an AI art generation process adheres to the text prompt. It is a specific number, or value, that represents the importance of a text prompt or description of an image that is generated with AI.

Images with a high guidance scale stick to the provided text prompts and may lack enough creativity. Therefore, you should aim to achieve a lower CFG value with each image-generation process, but not to an extremely low number. Always try to keep your numbers somewhere between seven and nine for high-quality results. 

In this article, we’ll dive into how to use the guidance scale in Stable Diffusion to enhance your images.

How Guidance Scale Works

The scale is the extent to which your process of generating AI images aligns with the given text prompt. When using an AI image generator, you feed it with texts describing the kind of image you desire. These text prompts guide your AI model to generate an image with all the defined features.

It’s important to ensure that your model adheres to the instructions provided in the text prompt–this is where the guidance scale comes in handy. It controls the extent to which the image-generation process follows the instructions provided in the prompts, ensuring that the final image meets your needs.

An image creation process with a low guidance scale means the AI model has more freedom to incorporate creativity in the results versus a more literal interpretation of the prompt that could happen with a higher number. In Stable Diffusion, most models' default guidance scale value is between seven and 7.5.

A lower number incorporates more creativity in the final image while a higher number indicates that the image is closely tied to the text prompt. Therefore, it’s important to check if your AI model has the capacity to be creative enough to generate the images you envision. This is important, even when you’re using an AI art generator free of charge.

How Guidance Scale Works in Stable Diffusion

Stable Diffusion is a popular deep-learning model that helps artists and content creators generate photorealistic images using simple text prompts and source images. This model, launched in 2022, uses diffusion techniques to generate images.

Programmers have discovered ways to enhance the performance of Stable Diffusion models using other advanced AI techniques and technologies like guidance scale, ControlNet, and LoRA. It’s important to know how to incorporate these additional technologies into your Stable Diffusion models if you want to generate better images.

For instance, if you appreciate the operational principles of LoRA technology in Stable Diffusion, you will be able to utilise it more effectively. You also need to spend some time exploring ControlNet’s role in Stable Diffusion

In Stable Diffusion, the guidance scale controls how much the final image adheres to the text prompt. Consider the guidance scale as the overall prompt strength. The higher the guidance scale, the less leeway your model has to exercise creativity. The value you set during image generation will depend on the results you desire.

The results also depend on the complexity of your text prompt, but the decision is entirely yours. Nevertheless, you should always experiment with several guidance scales to see the kind of results each scale is likely to give you before you set your final value. 

This way, you can tell whether to choose a scale that allows your model to be more creative or one that forces the model to strictly follow the text prompt. If you want to create an image that includes the tiny details contained in the prompt, set your initial guidance scale higher and scale it down as you fine-tune your image.

Try Your Hand at AI Art

The best way to learn and refine your AI art skills is to practise–and one of the best ways you can do this is by joining the NightCafe community. Use our free image generator to bring your ideas to life!

Create jaw-dropping art in seconds with AI

This is the most fun I've had on the internet in a long long time

u/DocJawbone on Reddit

Fun Fast Free