|

How To Install Stable Diffusion 2.1 (A Beginner’s Guide)

If you’re someone who wants to use Stable Diffusion 2.1 to generate images then you’ve landed on the right page. 

This new Stable Diffusion model comes with many improvements and in this guide, I’ll show you how to install Stable Diffusion 2.1 models and use them for generating images. 

In this quick guide, I’ll cover: 

  • How to install Stable Diffusion 2.1 models
  • How to use Stable Diffusion 2.1 models
  • Best tips to make the most out of it

Without any further ado, let’s get started. 

What is Stable Diffusion 2.1

Stable Diffusion 2.1 is a text-to-image generation model released by Stability AI on December 7, 2022.

The 2.1 version of Stable Diffusion comes after its predecessor Stable Diffusion 2.0 which came with significant improvements over the previous Stable Diffusion 1.0 and 1.5 models respectively. 

When Stable Diffusion 2.0 was launched, it was met with mixed reviews as it was trained heavily to filter out NSFW content. 

While not being able to create NSFW content wasn’t the big complaint, since the model was trained heavily to censor such content, it also removed a significant amount of good-quality data. 

This resulted in images not being very good and the resulting model didn’t feel like an improvement over Stable Diffusion 1.5

Soon after this, Stability AI launched the Stable Diffusion 2.1 which addressed all the shortcomings of the 2.0 model. 

The new 2.1 model comes with a modified NSFW filter which is less restrictive and is able to depict human bodies with better accuracy. 

Related: Stable Diffuson Statistics

How To Install Stable Diffusion 2.1

Installing the Stable Diffusion 2.1 ckpt model is pretty simple and straightforward. You first need to have the Stable Diffusion installed on your computer and you can then download the 2.1 model and use it. 

Here are the step-by-step instructions on how to install Stable Diffusion 2.1: 

Install Stable Diffusion WebUI

If you don’t have Stable Diffusion installed on your computer, you first need to download and install it. 

There are many Stable Diffusion GUIs out there that you can choose from such as Automatic1111 or ComfyUI. 

I’ve published detailed guides on both Automatic1111 and ComfyUI where I share steps to install them. 

To install either of the GUIs, you can use Stability Matrix software which is a one-click Stable Diffusion installer. With this, you won’t have to enter commands on a command prompt. 

Stability Matrix - Install Automatic1111

Also, make sure you meet the system requirements for Stable Diffusion so that it works properly on your computer. 

Related: How To Run Stable Diffusion on Mac

Download Stable Diffusion 2.1 ckpt

Install Stable Diffusion 2.1

Once you have Stable Diffusion installed, you can download the Stable Diffusion 2.1 ckpt model from HuggingFace. There are versions namely Stable Diffusion 2.1 Base and Stable Diffusion 2.1

The 2.1 Base model has a default image size of 512×512 pixels whereas the 2.1 model is for generating 768×768 pixel images. 

If you wish to generate large-size images, you should download the 2.1 model but if your computer is not capable of generating big images, you should stick with the 2.1 base model instead. 

Here are the download links for each model: 

2.1 Base Model 

Download Model (v2-1_512-ema-pruned.ckpt): 

https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.ckpt

Download Config File: 

https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference.yaml

Once downloaded, put both these files in the following directory: 

stable-diffusion-webui/models/Stable-diffusion

2.1 Model 

Download Model (v2-1_768-ema-pruned.ckpt): 

https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.ckpt

Download Config File: 

https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference.yaml

Once downloaded, put both these files in the following directory: 

stable-diffusion-webui/models/Stable-diffusion

How To Use Stable Diffusion 2.1

Now that you have the Stable Diffusion 2.1 models downloaded, you can find and use them in your Stable Diffusion Web UI. 

In Automatic1111, click on the Select Checkpoint dropdown at the top and select the v2-1_768-ema-pruned.ckpt model. 

Automatic1111 - Select Checkpoint Model

This loads the 2.1 model with which you can generate 768×768 images. If you wish to generate 512×512 images, select the v2-1_512-ema-pruned.ckpt 2.1 base model from the dropdown.  

Tips To Use Stable Diffusion 2.1

The new Stable Diffusion 2.1 model is definitely an improvement over its predecessor models such as the 2.0 or 1.5 models. 

But there are a few things you need to know to make the most out of this model. Otherwise, you’ll end up generating images that won’t look which would make you think this model isn’t good. 

So, here are some tips for using the Stable Diffusion 2.1 models: 

Write Detailed Prompts

Stable Diffusion 2.1 requires the prompts to be detailed, specific, and descriptive. This doesn’t mean you need to write very long prompts. 

Instead, your prompts need to explain the image in a much better way unlike in Stable Diffusion 1.5 or previous models where just a few words in the prompt were enough. 

You can get examples on Civitai of what kind of prompts work the best with Stable Diffusion 2.1 models. 

Set Proper Image Dimensions

Since there are two variants of the 2.1 model, you need to specify the correct dimensions when generating images. 

You can’t set 512×512 as the image dimension when using the 2.1 model which is trained on 768×768 images. This would only lead to bad results and your images won’t come out looking good. 

For the 2.1 base model, either the height or width of the image should be 512px and for the 2.1 model, it should be 768px. 

Use Negative Prompts

Using negative prompts is always a good practice regardless of what Stable Diffusion model you’re using. 

But with Stable Diffusion 2.1 models, you should definitely use negative prompts as they have a significant effect on improving image quality. 

Stability AI uses the following negative prompt in their demo images of the 2.1 model: 

cropped, lowres, poorly drawn face, out of frame, poorly drawn hands, blurry, bad art, blurred, text, watermark, disfigured, deformed, closed eyes

Besides this, you can also use textual inversion models in your negative prompt which can further improve your images. 

Related: Stable Diffusion 3: What’s New & How To Download It

Conclusion 

Stable Diffusion 2.1 models are quite an improvement and as you use them, you’ll notice the difference and improvement as well. 

With this guide, I hope you will be able to install Stable Diffusion 2.1 and use these models without any problems. 

However, if you have any questions regarding the Stable Diffusion 2.1 models, feel free to ask your questions in the comments section below.

Stable Diffusion Prompt Organizer

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.