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 a new advancement in AI image generation that is now supported in the Automatic1111 web UI. To install it, you need git and Python 3.10.6. After installing these prerequisites, you clone the Automatic1111 repository and switch to the 'sdxl' development branch. Windows users run the 'web user.bat' script, while others use their respective scripts to download and install necessary files. Once completed, the web UI can be accessed at localhost:7860. To enhance the model, copy the 'stxl-0.9-safetostream' file from the Hugging Face repository into the Stable Diffusion folder. For improved image quality, increase the resolution to 2048x2048. Keep in mind that Stable Diffusion requires more VRAM (10-12 GB) compared to Comfy UI (8GB), but optimizations are ongoing. Note that Ensemble models, including the refiner model for additional image details, are not currently supported. Regularly update by running 'git pull' and check GitHub for new changes. The official release of sdxl will explore compatibility with low VRAM devices, AMD, 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 your environment variables.
  • πŸ’» Visit the official Git website (git.scm.com) to download the appropriate Git installer for your operating system.
  • πŸ“‹ For Windows users, select the correct installer based on your CPU architecture (32-bit or 64-bit).
  • πŸ”„ Verify Git installation by opening the command prompt and typing 'git'.
  • 🐍 Install Python 3.10.6 by visiting the Python downloads page and selecting the installer for your OS, ensuring to include it in your environment variables.
  • πŸ“‚ Clone the Automatic 1111 repository by copying the HTTPS link and using the 'git clone' command in your terminal.
  • πŸ”„ Switch to the 'sdxl' development branch within the repository using 'git switch sdxl'.
  • πŸŽ›οΈ Run the 'web user.bat' script on Windows or the respective script on other operating systems to install necessary files and packages, including PyTorch.
  • 🌐 Once the installation is complete, the web UI will run locally at localhost:7860.
  • πŸ“Œ Copy the 'stxl 0.9 safe to store' file to the 'model stable diffusion' folder within the Stable Diffusion web UI folder, which can be obtained from the Hugging Face repository.

Q & A

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

    -Stable Diffusion XL is an advanced AI model that allows users to generate high-quality images. It is officially supported in the Automatic1111 web UI and, despite still being refined, it can produce impressive results that many people have found to be of the next level for AI image generation.

  • 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 can be downloaded from git.scm.com, and Python can be installed from the official Python downloads page with the necessary option to add Python to environment variables.

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

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

  • What is the process to install Stable Diffusion in Automatic1111?

    -To install Stable Diffusion in Automatic1111, visit the official repository, copy the HTTPS link from the 'code' dropdown, open a terminal in the desired installation folder, and use the 'git clone' command followed by the copied link. Then navigate into the repository, switch to the 'sdxl' development branch, and run the appropriate script for your operating system to download and install the necessary files and packages.

  • Where can I find the 'stxl-0.9-safetospore' file for Stable Diffusion?

    -The 'stxl-0.9-safetospore' file can be found in the Hugging Face repository, which is accessible to everyone. You need to fill out a necessary form, and once granted access, you can download the file.

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

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

  • How can I improve the quality of the generated images with Stable Diffusion XL?

    -To improve the quality of the generated images, you can increase the resolution to 2024 x 2024, which will result in a significant improvement in image quality.

  • What is the approximate memory requirement for running Stable Diffusion XL on my system?

    -Running Stable Diffusion XL requires more VRAM compared to the Comfort UI, approximately 10 to 12 GB, as opposed to 8GB for the Comfort UI.

  • Does Automatic1111 currently support Ensemble models?

    -As of the time of the script, 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.

  • How often should I update the sdxl branch to get the latest features and fixes?

    -You should run 'git pull' every now and then to update the sdxl branch and get the latest features and fixes. It's also a good practice to check the comment history on GitHub for any new changes before pulling.

  • What are some upcoming features or improvements for Stable Diffusion XL that we can expect?

    -The official release of Stable Diffusion XL (sdxl) will explore running it on low VRAM devices, AMD devices, and M1/M2 MacBooks, indicating that optimization and compatibility are areas of focus for future development.

  • How can I start using Stable Diffusion XL in Automatic1111 after installation?

    -After installation, you can run the web UI, select the 'sdxl 0.9' checkpoint from the checkpoints dropdown, and let the web UI process the file. Once the setup is complete, you can start generating images with Stable Diffusion XL.

Outlines

00:00

πŸš€ Introduction to Stable Diffusion XL in Automatic1111

The video introduces Stable Diffusion XL, a new AI image generation tool supported in the Automatic1111 web UI. It emphasizes that while the tool is still under refinement and not merged with the master branch, users can start utilizing it for impressive results. The video outlines the prerequisites for installation, including the need for Git and Python 3.10.6, and 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 handle the Stable Diffusion model file and offers a solution for image generation issues by modifying the 'use_ip.bat' script. The video concludes with tips on optimizing image quality, the system's VRM requirements, and the lack of support for Ensemble models in the current version of Automatic1111.

Mindmap

Keywords

Stable Diffusion XL

Stable Diffusion XL is a sophisticated AI model designed for generating high-quality images from textual descriptions. It represents an advancement in AI-generated imagery and is the central focus of the video, as it guides users through the installation process for utilizing this technology.

Automatic1111

Automatic1111 refers to a web user interface that supports the integration of AI models like Stable Diffusion XL. It is mentioned as the platform where users can install and use Stable Diffusion XL to generate images, indicating its role as a user-friendly interface for AI image generation.

Git

Git is a version control system for tracking changes in source code during software development. In the context of the video, it is a prerequisite for installing Stable Diffusion XL as it is used to clone the repository containing the necessary files for the AI model.

Python 3.10.6

Python is a widely-used high-level programming language, and the version 3.10.6 is specifically required for running Stable Diffusion XL. It is one of the technical prerequisites that users need to install before they can proceed with the setup of the AI model.

Repository

A repository, in the context of software development, is a location where the source code and version control history of a project are stored. The video instructs users to clone the Automatic1111 repository to access the files needed for installing Stable Diffusion XL.

Branch

In version control, a branch is a separate line of development, created when developers want to work on a specific feature or fix independently from the main codebase. The 'sdxl development Branch' mentioned in the video is where the current development of Stable Diffusion XL resides.

Pi Torch

PyTorch is an open-source machine learning library based on the Torch library, used for applications such as computer vision and natural language processing. It is a necessary package for running Stable Diffusion XL, as it provides the framework for the AI model to operate.

Web UI

Web UI stands for Web User Interface, which is a way for users to interact with the web applications. In the video, the Web UI is the interface through which users can operate Stable Diffusion XL to generate images after the setup is complete.

Checkpoints

In machine learning, checkpoints are points at which the state of the model is saved during training. The video refers to selecting the 'sdxl 0.9' checkpoint from the Web UI, which is a specific version of the Stable Diffusion XL model to be used for image generation.

Ensemble Models

Ensemble models are a type of machine learning model where multiple models are trained and combined to improve the overall performance. The video notes that Automatic1111 currently does not support ensemble models, which means users cannot use the refiner model for additional detail in image generation.

Optimization

Optimization in the context of software refers to the process of improving the efficiency and performance of a program. The video mentions that optimization is ongoing for Stable Diffusion XL, particularly in reducing the memory requirements for generating images.

VRAM

VRAM stands for Video RAM and is the memory used by the graphics processing unit (GPU) to store image data for rendering. The video highlights that generating images with Stable Diffusion requires more VRAM, which is a consideration for users when setting up the AI model.

Highlights

Stable Diffusion XL is officially supported in the Automatic1111 web UI, offering AI-generated images at a new level.

The tool is still being refined and not yet merged with the master branch.

Prerequisites include installing Git and Python 3.10.6.

Git installation is straightforward and system-specific installers are available.

Python 3.10.6 installation requires adding Python to environment variables.

Stable Diffusion can be installed in Automatic1111 by cloning the official repository and switching to the 'sdxl' development branch.

Windows users run the 'web user.bat' script, while other users run their respective scripts to start the process.

After script execution, the tool runs locally at localhost:7860.

The 'stxl-0.9-safetostore.ckpt' file should be copied to the model stable diffusion folder for setup.

The file can be obtained from the Hugging Face repository after filling out a necessary form.

The web UI allows users to select the 'sdxl 0.9' checkpoint for processing files.

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

If image generation issues occur, a quick fix is to modify the 'use IP.bat' script by adding the 'no half' argument.

Increasing the resolution to 2024x2024 can significantly improve the quality of generated images.

Stable Diffusion requires more VRAM, approximately 10-12 GB, compared to other UIs.

Optimization is ongoing to reduce VRAM usage 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 but can make faces look similar.

The 'sdxl' branch is under development, and users should regularly pull updates for new features and fixes.

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