Welcome to this step-by-step guide on installing Stable Diffusion's SDXL 1.0. This blog post aims to streamline the installation process for you, so you can quickly utilize the power of this cutting-edge image generation model released by Stability AI. We also cover problem-solving tips for common issues, such as updating Automatic1111 to version 5.1.1 or newer.
If you have already completed the preparatory steps and are eager to move on to the installation of Stable Diffusion's Web UI: Automatic1111, Invoke 3.0, and Comfy UI, you can jump right into our dedicated installation guides below.
Let's jump right into it.
Table of Contents:
Pre-installation: Setting Up Your System (skip this if you've already done it)
Pre-installation: Setting Up Your System
Skip this section if you already have the pre-requisites.
Before we dive into the installation of SDXL 1.0, it's crucial to ensure that your system is prepared. Having the right setup will allow the installation process to run smoothly and ensure optimum performance of the model.
System Requirements: SDXL 1.0 requires a system with a modern GPU (8GB VRAM or higher is recommended) to function optimally. Ensure that your computer meets these requirements.
Software Requirements: It's essential to have Python 3.8 or above installed on your system. You can download the latest version from the official Python website. Additionally, check that you have the latest versions of all the required Python libraries installed. These include torch, torchvision, numpy, and a few others. Most will recommend Python 3.10.6 which I use as well.
Update Automatic1111: If you have an older version of Automatic1111, you may encounter problems during the installation of SDXL 1.0. Make sure you have updated to version 5.1.1. In case you face issues updating the software using the gitpull function in the .bat file or Fetch Origins in GitHub Desktop, you may need to install a new version of Automatic1111.
Get Comfy with ComfyUI: Stability AI recommends using ComfyUI for SDXL 1.0. While this guide will not cover the details of installing and using ComfyUI, it's worth noting its importance. As I familiarize myself with ComfyUI, I plan to create a separate guide for it in the future. You can find the repository for ComfyUI here.
After making sure your system meets these requirements, you're all set to move on to the actual installation of SDXL 1.0. Let's get started!
Installing SDXL 1.0
Now that you've completed the pre-installation steps, let's dive into the process of installing SDXL 1.0. This step-by-step guide will lead you through the process, ensuring that you can start creating breathtaking images in no time!
1. Download SDXL 1.0:
The first step is to download the SDXL 1.0 model. You can access the download link on the Stability AI GitHub page. Be sure to download the three models: base, offset, and lora.
Download the 3, SDXL 1.0 model weights HERE.
Download the 2, SDXL 1.0 refiner models HERE.
2. After successfully downloading the required files:
Navigate to your Automatic1111 Installation Folder. Deposit the model files into their designated locations. This precise placement is crucial for proper functionality.
Transfer the files 'sd_xl_base_1.0.safetensors' and 'sd_xl_refiner_1.0.safetensors' into the 'models' folder > 'Stable-diffusion' folder. If you opted to download the additional files, they too should be placed here.
Transfer the file 'sd_xl_offset_example-lora_1.0.safetensors' into the 'Lora' folder > 'Stable-diffusion' folder.
3. Once the files are correctly placed, launch Automatic111 WebUI.
To utilize these models, navigate to the top left corner and select 'Stable Diffusion checkpoint' from the dropdown menu. From here, you can select your desired model.
On a clean installation of A1111, particularly recommended for SDXL 1.0, you should see either 2 or 4 models - a pair of base models and a pair of refiners, each with a VAE version. Importantly, despite being labelled as VAE versions, these are not VAE files, and hence they don't belong in the VAE folder.
You are now all set to use these models! Everything below is extra information for those who want to know more about SDXL and need to trouble shoot.
Understanding the SDXL 1.0 Models
Each model in the SDXL 1.0 lineup performs a unique role, contributing to the overall image creation process. Let's learn about each model and the functions they serve:
1. sd_xl_base_1.0.safesensors: This is the primary model used for generating images. It provides the basic structure and form of your images, laying a solid groundwork for any additional layers of detail.
sd_xl_offset_example-lora_1.0.safesensors: This is an add-on to the base model that refines and sharpens the image output. It introduces additional detail and contrast to your creations, making them more visually compelling and lifelike.
sd_xl_refiner_1.0.safesensors: The refiner model takes the image created by the base model and polishes it further. It fine-tunes the details, adding a layer of precision and sharpness to the visuals.
The VAE versions: In addition to the base and the refiner, there are also VAE versions of these models available. The VAE or Variational Autoencoder versions have an additional VAE embedding layer, which might enhance the overall image quality. These versions were released shortly after the official models and their impact on the image quality is still under review. If you experiment with these and observe any noticeable improvements, please share your findings. Your feedback can help the community to understand these models better and to maximize their potential.
Accessing the 'Lora to prompt' Tab This particular tab only becomes visible when you activate it. To do this:
Understanding the Usage of SDXL 1.0, LoRa, and Refiner + Trouble Shoot
Activate the LoRa Network
Let's get into the usage of the SDXL 1.0, LoRa, and the Refiner, to understand how to actually use them.
Activating the 'Lora to Prompt' Tab: This tab is hidden by default. To enable it, head over to Settings > User Interface > Quick Setting List and then choose 'Add sd_lora'. Once done, you'll see a new tab titled 'Add sd_lora to prompt'.
Setting SD VAE: Ensure that SD VAE is set to Automatic. It's important to note that it doesn't work with LoRa's from SD 1.5.
Utilizing Offset LoRa's: Using the offset LoRa's that you downloaded is optional but can potentially lead to better results.
Selecting the LoRa: Activate the network menu by clicking on the Icon for Show/Hide Networks, then head over to LoRa tab. Find your sd_xl_offset_example-lora_1.0. Once selected, it will automatically append the LoRa prompt to the end of your existing prompt. It should look something like <lora:offset_0.2:1>. The numbers represent the weights. If you're unfamiliar with this, refer to my blog post on how to use LoRa's. Here's the Link. (Sorry currently being updated)
Preferred Dimensions: SDXL 1.0 performs optimally at a resolution of 1024x1024, so consider working with images of this size.
Using the Refiner: The Refiner is slightly annoying to use. You need to send your rendered images to 'img2img', then switch your Stable Diffusion Checkpoint to the refiner model.
If your installation keeps getting errors: It's important that your Automatic1111 is updated to version 1.5.1. Updating via Git Pull or GitHub Desktop's Fetch can be problematic and not truly update. The solution? Install a new copy, preferably a separate version for SDXL 1.0.
A1111 V1.5.1 or Later
Start experimenting with the denoising strength; you'll want a lower value to retain the image's original features for refining. Remember to delete the LoRa out of the prompt to avoid errors. You might need to use the 'restore face' option if the images look distorted.
Keep playing around with the settings and find what combination works best for you. The aim is to push the boundaries of with SDXL 1.0 and produce unique, high-quality images.
With SDXL 1.0 still fresh out of the box, it's an exciting time to explore and experiment. The full extent of its features are yet to be uncovered and you can bet I'll be right here, updating you with the latest insights as we learn them. This is a collective endeavour and I'm certain that in a year's time, we'll be well-versed in the workings of SDXL 1.0, assisting others in creating wonders with it. We're stepping into the unknown together and I'm thrilled to discover where this path leads us.
Launch Announcement: Stable Diffusion SDXL 1.0: The Free & Uncensored Future of Image Creation
Got a question or Requests? Leave a comment below to let me know if this information becomes outdated. I will do my best to keep this blog updated as time goes on.
Stay up to date with what's happening with Stability AI and Stable Diffusion.