How To Install Stable Diffusion XL 0.9 In Automatic1111 (Setup Guide)

Future Thinker @Benji
15 Jul 202304:23

TLDRStable Diffusion XL 0.9 is now officially supported in the Automatic1111 web UI, offering users an enhanced AI image generation experience. To get started, users need to install prerequisites like git and Python 3.10.6. After installing these, users can clone the Automatic1111 repository and switch to the 'sdxl' development branch. The web UI will then download and install necessary files, including PyTorch, and start running locally. Users can generate high-quality images by selecting the 'sdxl 0.9' checkpoint and adjusting the resolution. While the initial image may require some tweaking, the process is straightforward and results are impressive. However, it's worth noting that Stable Diffusion uses more VRAM and currently doesn't support Ensemble models. Regular updates are expected as the 'sdxl' branch is still under development, with future improvements including support for low VRAM devices and optimization for AMD and M1/M2 MacBooks.

Takeaways

  • 🚀 Stable Diffusion XL 0.9 is an advanced AI image generation tool, now officially supported in the Automatic1111 web UI.
  • 💻 Prerequisites for using Stable Diffusion XL include having Git and Python 3.10.6 installed on your system.
  • 📥 To install Git, visit git.scm.com and download the installer for your operating system.
  • 🔍 For Python installation, follow the provided link to the Python downloads page and select the installer for your OS.
  • 📂 Ensure Python is added to your environment variables during the installation process.
  • 🔗 Clone the Automatic1111 repository by using the 'git clone' command with the copied HTTPS link.
  • 🔄 Switch to the 'sdxl development' branch within the repository to prepare for Stable Diffusion XL.
  • 🖥️ Run the appropriate script for your operating system to download and install all necessary files and packages.
  • 🌐 After setup, access the web UI at localhost:7860 to start generating images with Stable Diffusion XL.
  • 📁 Copy the 'stxl-0.9-safetostream.pt' file to the model stable diffusion folder within the web UI folder.
  • 🔍 For improved image quality, increase the resolution to 2024x2024.
  • 💾 Generating images with Stable Diffusion requires more VRAM, typically around 10-12 GB.
  • ⚙️ The current version of Automatic1111 does not support Ensemble models, so the refiner model cannot be used.
  • 📈 Regularly run 'git pull' to update the 'sdxl' branch with the latest features and fixes.
  • 🔍 Check the comment history on GitHub for any new changes before pulling updates.

Q & A

  • What is Stable Diffusion XL?

    -Stable Diffusion XL is an advanced AI image generation tool that is officially supported in the Automatic1111 web UI. It allows users to create high-quality AI-generated images.

  • Is Stable Diffusion XL fully merged with the master branch?

    -No, as of the time of the transcript, Stable Diffusion XL is still being refined and has not been merged with the master branch.

  • What are the prerequisites for installing Stable Diffusion XL?

    -To install Stable Diffusion XL, you need to have Git and Python 3.10.6 installed on your system.

  • How do you check if Git is installed correctly?

    -After installing Git, you can open the command prompt and type 'git' to verify if it's working properly.

  • What should be done to add Python to the environment variables during installation?

    -During the Python installation process, ensure that the option to add Python to the environment variables is ticked.

  • How do you clone the Automatic1111 repository?

    -You can clone the repository by using the 'git clone' command followed by the copied HTTPS link from the 'code' dropdown on the official repository page.

  • What branch should be switched to in order to work with Stable Diffusion XL?

    -You should switch to the 'sdxl development' branch by typing 'git switch sdxl' in the terminal.

  • How do you start the Stable Diffusion XL setup on Windows?

    -On Windows, you should run the 'web user.bat' script to download and install all the necessary files and packages, including PyTorch.

  • What is the recommended resolution to improve the quality of generated images?

    -To improve the quality of generated images, it's recommended to increase the resolution to 2024 x 2024.

  • Does Stable Diffusion XL currently support Ensemble models?

    -As of the time of the transcript, Stable Diffusion XL does not support Ensemble models, so the refiner model cannot be used as it is in the Comfy UI.

  • What is the approximate amount of VRAM required for Stable Diffusion XL?

    -Generating images with Stable Diffusion XL requires around 10 to 12 GB of VRAM.

  • How can you ensure you have the latest features and fixes for Stable Diffusion XL?

    -To get the latest features and fixes, you should run 'git pull' periodically and check the comment history on GitHub for any new changes before pulling.

Outlines

00:00

🚀 Introduction to Stable Diffusion XL in Automatic1111

The video introduces Stable Diffusion XL, a new AI image generation tool officially supported in the Automatic1111 web UI. Although it's still being refined and not merged with the master branch, users can start using it to achieve impressive results. Before using it, prerequisites include installing Git and Python 3.10.6. Detailed instructions are provided for installing these on different operating systems, cloning the Automatic1111 repository, switching to the 'sdxl' development branch, and running the web UI. The video also addresses how to deal with initial imperfections in generated images by increasing the resolution and mentions the higher VRM requirements compared to the Comfy UI. It concludes by advising viewers to keep the tool updated and to look forward to the official release of Stable Diffusion XL with support for low VRM devices.

Mindmap

Keywords

💡Stable Diffusion XL

Stable Diffusion XL is an advanced AI image generation model that is designed to produce high-quality images from textual descriptions. In the context of the video, it is being introduced as a new feature in the Automatic1111 web UI, which allows users to leverage this model to create more sophisticated AI-generated images. The script discusses how to install and use Stable Diffusion XL to achieve impressive results.

💡Automatic1111

Automatic1111 refers to a web user interface that supports various AI models, including Stable Diffusion XL. It is mentioned in the script as the platform where users can install and interact with Stable Diffusion XL. The video provides a setup guide for integrating Stable Diffusion XL into the Automatic1111 environment.

💡Git

Git is a version control system that is used for tracking changes in source code during software development. In the script, it is listed as a prerequisite for installing Stable Diffusion XL on the Automatic1111 platform. Users are instructed to download and install Git from its official website to manage the source code of the AI model.

💡Python 3.10.6

Python is a high-level programming language widely used for general-purpose programming. The version specified, 3.10.6, is the required Python version for running Stable Diffusion XL as per the instructions given in the video script. It is essential for the execution of the AI model's code within the Automatic1111 interface.

💡Environment Variables

Environment variables are a set of dynamic values that can affect the way running processes behave on a computer. In the context of the video, adding Python to the environment variables is a step in the installation process that allows the system to recognize Python as a command that can be executed from any location.

💡Repository

A repository, often abbreviated as 'repo', is a storage location where the source code of a project is kept using a version control system like Git. The script instructs viewers to visit the official repository of Automatic1111 to clone the source code necessary for installing Stable Diffusion XL.

💡Branch

In version control, a branch is a separate line of development that diverges from the main, or 'master', branch. The script directs users to switch to the 'sdxl development' branch to access the specific version of the code required for Stable Diffusion XL.

💡Web UI

Web UI stands for Web User Interface, which is the visual component of a web application that allows users to interact with the software through a web browser. The video script describes how to run the Web UI for Automatic1111 to start using Stable Diffusion XL and generate images.

💡Checkpoints

In the context of AI and machine learning, checkpoints refer to the saved states of a model at certain stages of training. The script mentions selecting the 'sdxl 0.9 inches tensor' from the checkpoints dropdown in the Web UI, which is a specific state of the Stable Diffusion XL model to be used for image generation.

💡Ensemble Models

Ensemble models are a type of AI model that combines the predictions from multiple different models to improve performance. The video notes that Automatic1111 currently does not support ensemble models, which means users cannot use the refiner model that adds details to the generated images.

💡Optimization

Optimization in the context of software refers to the process of improving the efficiency and performance of the code. The script mentions that optimization is still underway for Stable Diffusion XL, particularly in reducing the memory requirements for generating images.

💡Git Pull

Git pull is a command used in Git to fetch and merge changes from a remote repository into the current branch. The video advises users to run 'git pull' periodically to update their local copy of the code with the latest features and fixes from the development branch.

Highlights

Stable Diffusion XL 0.9 is an advanced AI image generation tool now supported in the Automatic1111 web UI.

While still in development, users can already start using Stable Diffusion XL to see impressive results.

Prerequisites for installation include having Git and Python 3.10.6 installed.

Git installation is straightforward and requires selecting the correct installer for your operating system.

Python 3.10.6 installation should include adding Python to your environment variables.

To install Stable Diffusion in Automatic1111, clone the official repository and switch to the 'sdxl' development branch.

Windows users can run the 'web user.bat' script, while other users should run their respective scripts to download and install necessary files.

After installation, the web UI will start on localhost:7860.

To use Stable Diffusion, copy the 'stxl-0.9-safetostream' file to the model stable diffusion folder.

The 'stxl-0.9-safetostream' file can be obtained from the Hugging Face repository after filling out a necessary form.

Select the 'sdxl 0.9' checkpoint from the web UI to begin processing files.

For stability, it is recommended to close and restart the 'web user.bat' script after setup.

If image generation issues occur, a quick fix is to add 'no-half-cpu' to the command line arguments in the 'use IP.bat' script.

Initial generated images may require improvement, which can be achieved by increasing the resolution to 2024x2024.

Stable Diffusion requires more VRAM, using around 10-12 GB compared to Comfy UI's 8GB.

Optimization for lower VRAM usage is ongoing and expected to improve in the official release.

Auto 1111 does not currently support Ensemble models, meaning the refiner model cannot be used.

The refiner model is known for adding details to colors, faces, hands, and outfits in generated images.

The 'sdxl' branch is under active development, so it's advised to regularly run 'git pull' for updates.

Users are encouraged to check the comment history on GitHub for any new changes before pulling updates.

The official release of 'sdxl' will explore running it on low VRAM devices, AMD devices, and M1/M2 MacBooks.