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 an advanced AI image generation tool now supported in the Automatic1111 web UI. To install, ensure you have Git and Python 3.10.6 installed. For Git, download from git.scm.com and verify installation through command prompt. For Python, download from the official site and ensure it's added to environment variables. Clone the Automatic1111 repository, switch to the 'sdxl' development branch, and run the appropriate script for your OS to install dependencies and start the service at localhost:7860. To enhance image generation, copy the 'stxl-0.9-safetostream.ckpt' file into the model folder. If issues arise, modify the 'use_ip.bat' script to include 'no-halfway'. For better image quality, increase resolution to 2048x2048. Note that while Stable Diffusion requires more VRAM (10-12GB), optimization is ongoing. Although it doesn't support Ensemble models like the refiner model in Comfy UI, it still produces impressive results. Regularly update by pulling from the 'sdxl' branch for the latest features and fixes. Stay updated for the official release supporting low VRAM devices and M1/M2 MacBooks.

Takeaways

  • 🚀 Stable Diffusion XL 0.9 is now supported in the Automatic 1111 web UI, offering enhanced AI-generated images.
  • 📋 Before starting, ensure you have Git and Python 3.10.6 installed on your system, with Python added to environment variables.
  • 🔄 To install Stable Diffusion, visit the Automatic 1111 repository, clone it, and switch to the 'sdxl' development branch.
  • 🎯 After cloning, navigate to the repo and run the appropriate script for your OS to download and install necessary files and packages.
  • 🌐 Once completed, the web UI will run locally, accessible at localhost:7860 for further actions.
  • 📁 Copy the 'stxl 0 9 safe to sore file' to the 'model stable diffusion' folder inside the 'Stable Diffusion web UI' folder from the Hugging Face repository.
  • 🔧 If image generation issues occur, modify the 'use IP batscript' file by adding 'no half' to the command line args and restart the script.
  • 📊 For better image quality, increase the resolution to 2024x2024 post-initial generation.
  • 💻 Note that Stable Diffusion requires more VRAM (10-12GB) compared to the previous UI (8GB), but optimizations are ongoing.
  • 🔄 Ensemble models like the refiner model are currently unsupported in Automatic 1111, but development continues for future improvements.
  • 🌐 Keep the system updated by regularly running 'git pull' and checking GitHub's comment history for the latest features and fixes.

Q & A

  • What is Stable Diffusion XL and how does it enhance AI-generated images?

    -Stable Diffusion XL is an advanced version of the AI image generation tool that is officially supported in the Automatic1111 web UI. It offers improved image generation capabilities, enabling users to produce more detailed and higher quality images compared to previous versions.

  • What are the prerequisites for installing Stable Diffusion XL in Automatic1111?

    -To install Stable Diffusion XL, you need to have Git and Python 3.10.6 installed on your system. Git is used for version control and Python is the programming language in which the AI model is written.

  • How can I check if Git is installed correctly on my system?

    -After installing Git, you can open the command prompt and type 'git' to verify if it's working properly. If Git is installed correctly, the command prompt will respond with information about Git.

  • What should I do if I encounter issues with generating images?

    -If you face issues while generating images, you can try opening the 'use_ip.bat' script file in a text editor, adding the argument 'no_halfway' to the command line args, saving the file, and running the script again.

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

    -To enhance the quality of the generated images, it is recommended to increase the resolution to 2024 x 2024.

  • How much VRAM is required to run Stable Diffusion XL on my system?

    -Running Stable Diffusion XL requires a bit more VRAM compared to the Comfortable UI, taking around 10 to 12 GB.

  • Does Automatic1111 currently support Ensemble models?

    -As of the information provided, Automatic1111 does not support Ensemble models, which means you won't be able to use the refiner model that adds details to colors, faces, hands, and outfits in the generated images.

  • What should I do to keep my Stable Diffusion XL installation up to date?

    -To ensure you have the latest features and fixes, you should regularly run 'git pull' in the sdxl development branch of the Automatic1111 repository.

  • How do I install Python 3.10.6 for Stable Diffusion XL?

    -To install Python 3.10.6, follow the link to the Python downloads page, select the installer for your operating system, and proceed with the default settings. Make sure to check the option to add Python to your environment variables.

  • What is the process to clone the Automatic1111 repository and switch to the sdxl development branch?

    -Visit the official repository of Automatic1111, copy the HTTPS link from the 'code' dropdown, open a terminal in the folder where you want to install Automatic1111, use the 'git clone' command followed by the copied link to clone the repository, navigate into the repo with the 'CD' command, and then switch to the sdxl development branch by typing 'git switch sdxl'.

  • How can I access the stxl 0.9 safe to store file for Stable Diffusion?

    -You can access the stxl 0.9 safe to store file from the Hugging Face repository by filling out the necessary form, which will grant you access. Once you have the file, copy it to the model stable diffusion folder inside the Stable Diffusion web UI folder.

  • What is the default local machine port where the Stable Diffusion XL will run after installation?

    -After the installation and setup process is complete, Stable Diffusion XL will run on your local machine at port 7860.

Outlines

00:00

🚀 Introduction to Stable Diffusion XL in Automatic1111

The video introduces Stable Diffusion XL, a new AI image generation tool that's officially supported in the Automatic1111 web UI. It's currently under refinement and not yet merged with the master branch, but users can start using it to achieve impressive results. Before starting, viewers are advised to install prerequisites like git and Python 3.10.6. The video provides a step-by-step guide on how to install these prerequisites, clone the Automatic1111 repository, switch to the 'sdxl' development branch, and run the web UI. It also explains how to deal with initial imperfections in generated images by increasing the resolution and provides a quick fix for common issues. The video concludes by noting the higher VRM requirements for Stable Diffusion and mentions that while it doesn't currently support ensemble models like the refiner model, ongoing development promises future improvements and optimizations.

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 prompts. In the context of the video, it represents the next level of AI image generation technology that viewers are encouraged to explore. The script discusses its integration with the Automatic1111 web UI, indicating that it is a significant upgrade from previous models.

💡Automatic1111

Automatic1111 is a web user interface that supports the Stable Diffusion XL model, allowing users to generate AI images through a graphical interface. The script provides a guide on how to install and use Stable Diffusion XL within the Automatic1111 environment, emphasizing its user-friendly approach to accessing advanced AI capabilities.

💡Git

Git is a version control system for tracking changes in source code during software development. It is a prerequisite for installing Stable Diffusion XL as per the script, which instructs users to download and install Git from its official website. Git is essential for cloning the Automatic1111 repository and managing the development branch for the AI model.

💡Python 3.10.6

Python is a high-level programming language widely used for general-purpose programming. The script specifies Python 3.10.6 as a requirement for running Stable Diffusion XL, indicating its role as the underlying software environment necessary for the AI model's operation. Users are guided to install Python and add it to their system's environment variables.

💡Repository

A repository in the context of the script refers to the official source code location, or 'repo,' where the Automatic1111 software and associated files are stored. Users are directed to clone this repository to their local machine to begin the installation process for Stable Diffusion XL.

💡Development Branch

A development branch in version control systems like Git is a divergent path created from the main codebase to work on new features or fixes. The script instructs users to switch to the 'sdxl' development branch within the Automatic1111 repository to access the latest features of Stable Diffusion XL.

💡Web User Interface (UI)

The Web User Interface (UI) is the graphical interface through which users interact with the Automatic1111 software to generate images using Stable Diffusion XL. The script mentions that after installation, users can run the web UI to start the image generation process, highlighting the ease of use and accessibility of the technology.

💡Checkpoints

In the context of AI models, checkpoints refer to specific versions or milestones of the model's training progress that can be saved and reloaded. The script indicates that users can select the 'sdxl 0.9' checkpoint from a dropdown menu in the web UI, which is a specific version of the Stable Diffusion XL model used for image generation.

💡Ensemble Models

Ensemble models are a machine learning technique where multiple models are trained and their predictions are combined to improve the overall performance. The script notes that Automatic1111 currently does not support ensemble models, which means that certain features like the refiner model, which adds details to generated images, are not available.

💡Refiner Model

The refiner model is an additional component in some AI image generation systems that enhances the details of generated images, particularly in areas like colors, faces, hands, and outfits. The script mentions that while the refiner model is not supported in Automatic1111, it is known for adding significant details to the images it processes.

💡Optimization

Optimization in the context of the script refers to the ongoing process of improving the efficiency and performance of the Stable Diffusion XL model, particularly in terms of reducing the memory requirements. The script indicates that the current memory usage is higher than desired, but that improvements are expected in future releases.

💡VRM

VRM, or Video RAM, refers to the dedicated memory used by a graphics processing unit (GPU) to store image data for rendering. The script mentions that generating images with Stable Diffusion requires more VRM compared to the Comfy UI, indicating the higher graphical demands of the newer model.

Highlights

Stable Diffusion XL 0.9 is now officially supported in the Automatic1111 web UI.

It offers an advanced level of AI-generated image creation.

Prerequisites include installing Git and Python 3.10.6.

Git installation is straightforward and system-specific.

Python 3.10.6 installation requires adding Python to environment variables.

Automatic1111's official repository is used to clone the repository for installation.

Switching to the 'sdxl development' branch is necessary before using Stable Diffusion.

Windows users run the 'web user.bat' script, while others use their respective scripts.

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

The 'stxl 0.9 safe to store' file should be copied to a specific folder for model stability.

The Hugging Face repository provides access to the necessary file for Stable Diffusion.

The web UI allows users to select the 'sdxl 0.9 inches tensor' from a dropdown.

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

A quick fix for image generation issues involves editing the 'use IP.bat' script.

Increasing the resolution to 2024x2024 can significantly improve image quality.

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

Optimization for lower VRAM usage is ongoing for the official release.

Auto 1111 does not currently support Ensemble models, such as the refiner model.

The refiner model is known for adding details but can make faces look similar.

Regular updates and 'git pull' commands are advised to keep up with the latest features and fixes.

The sdxl branch is under development with plans for support on low VRAM devices, AMD devices, and M1/M2 MacBooks.