Stable Diffusion Clip Skip: Explained + Best Settings

Stable Diffusion Clip Skip
On This Page

Today, I am going to cover the stable diffusion clip skip setting.

Learning how to use this setting will help you generate images according to your model correctly.

So if you want to make more efficient and better looking images in stable diffusion, this article is for you.

On This Page:

What is Clip Skip Stable Diffusion?

Clip skip is a setting in stable diffusion that skips layers in the generation process.

Stable Diffusion Clip Skip Setting

Layers in this instance are responsible for interpreting the prompt syntax that you have. Each layer might focus on different categories or more specific keywords of what your prompt has.

For example the keyword “male” can be broken down into categories like grandpa, child, etc. And each layer is responsible for interpreting this.  

Therefore, having a higher clip skip avoids some of the layers during image generation

Note: Clip skip only applies to stable diffusion models that are versions 1.X, stable diffusion XL, and 2.X use OpenClip instead.

How Does Clip Skip Impact Image Generation?

In general:

  • Lower Values: Stable diffusion will follow your prompt better
  • Higher Values: This makes generation less flexible and more generally follows the prompt

This general description makes it sound like having a clip skip of one would be best but this is not always true.

Which leads us to what settings you should use:

What Is The Best Setting For Clip Skip?

The quick answer is using either 1 or 2 for clip skip, which is usually good for almost all image generation. 

But the long answer is that it can depend.

The best setting to use is usually determined by your stable diffusion checkpoint or model. Some models have a recommended setting that you should follow to get the best results. 

How Do I Add Clip Skip To Stable Diffusion?

Some software have the clip skip setting hidden, so I am going to show you where to find it and add it to your UI.

1. Access The Settings Menu In Stable Diffusion

Click on the settings tab or button to access the settings

2. Find The Clip Skip Setting

For some software, you will need to find the settings, or you can search like in the image below to find the clip skip settings:

Automatic1111 Webui Changing Settings

After finding the appropriate setting, you have two options for how to change the clip skip setting:

3. Either Add Clip Skip To The UI or Adjust It In The Settings

Depending on the software you are using, you will have two options here. You can change the clip skip setting from the settings menu or add it to your UI. 

This is what it looks like to change the skip clip in the settings menu:

Changing Skip Clip Setting

But you can add clip skip to your UI for easy access:

Access your user interface menu and access your quick settings list. Then add “CLIP_stop_at_last_layers” to your quick settings list.

Adding Clip Skip Setting To Automatic1111 Webui

This will add the setting to the top of your UI.

4. Save Your Settings

Sometimes, your settings don’t save unless you manually save them.

Saving Setting In Automatic1111 Webui

Make sure to save any changes to your settings!

Comparisons Of Different Setting Values

I am going to illustrate the differences in using different clip skip settings with the prompt below:

Image Generated With Clip Skip Setting 1
Clip Skip: 1
Image Generated With Clip Skip Setting 3
Clip Skip: 3
Image Generated With Clip Skip Setting 5
Clip Skip: 5
Image Generated With Clip Skip Setting 7
Clip Skip: 7
Image Generated With Clip Skip Setting 9
Clip Skip: 9
Image Generated With Clip Skip Setting 11
Clip Skip: 11

Prompt: woman, face portrait, dynamic pose, intricate, elegant, highly detailed, realistic, photo, daytime, outside, beautiful

As you can see, with each increase of the setting, the images follow the prompt to less of an extent, to the point of where the woman doesn’t even appear in the highest setting.

Let Me Know Your Thoughts

There you go, that’s everything you need to know about the stable diffusion clip skip setting.

Now I want to hear your thoughts:

What’s the best setting that you have used?

Let me know by leaving a comment below.

Leave a Comment