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 available for use in the Automatic1111 web UI, offering users a chance to create high-quality AI-generated images. To get started, users need to install prerequisites like git and Python 3.10.6, and then clone the Automatic1111 repository, switch to the 'sdxl' development branch, and run the appropriate script for their operating system. This will install all necessary files and packages, including PyTorch. The web UI can be accessed locally, and users can select the 'sdxl 0.9' checkpoint to process their images. For improved image quality, the resolution can be increased to 2024x2024. Although Stable Diffusion requires more VRAM compared to Comfy UI, optimization is ongoing. It's important to note that Automatic1111 currently doesn't support Ensemble models, so the refiner model is not available. Users are encouraged to keep their system updated by pulling the latest changes from the 'sdxl' branch for new features and fixes. The official release of Stable Diffusion XL is anticipated to include support for low VRAM devices, AMD devices, and M1/M2 MacBooks.

Takeaways

  • 🎨 **Stable Diffusion XL 0.9 is now supported in Automatic1111 web UI**: This is a significant update for users looking to enhance their AI-generated images.
  • 📋 **Prerequisites**: Before installing, ensure you have Git and Python 3.10.6 installed on your system.
  • 💻 **Git Installation**: Visit git.scm.com to download the installer suitable for your operating system, with specific attention to your CPU architecture.
  • 🐍 **Python Installation**: Follow the provided link to the Python downloads page, select the installer for your OS, and ensure Python is added to your environment variables.
  • 🔄 **Clone the Repository**: Navigate to the official repository of Automatic1111, clone it using the HTTPS link, and switch to the 'sdxl' development branch.
  • 📦 **Install Stable Diffusion**: Run the appropriate script for your operating system to download and install all necessary files and packages.
  • 🌐 **Web UI Access**: Once installed, access the web UI at localhost:7860 and select the 'sdxl 0.9' checkpoint to start generating images.
  • 📁 **Model File Transfer**: Copy the 'stxl 0.9 safe to store' file to the model stable diffusion folder within the web UI folder.
  • 🚫 **Troubleshooting**: If image generation issues arise, modify the 'use IP.bat' script to include the 'no half way' argument and rerun the script.
  • 📈 **Image Quality Improvement**: Increase the resolution to 2024x2024 for better image quality, although this requires more VRM.
  • 🚧 **Optimization in Progress**: The current VRM requirement is higher than previous versions, but ongoing optimization is expected to reduce this in future releases.
  • 🔍 **Ensemble Models Unsupported**: Note that Automatic1111 does not currently support ensemble models, so features like the refiner model are not available.

Q & A

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

    -Stable Diffusion XL is an advanced AI model that significantly improves the quality of AI-generated images. It is officially supported in the Automatic1111 web UI and allows users to achieve more detailed and realistic image outputs.

  • 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 developed.

  • 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 generating images with Stable Diffusion XL?

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

  • How much VRAM is required to generate images with Stable Diffusion XL?

    -Generating images with Stable Diffusion XL requires more VRAM compared to the Comfy UI, typically around 10 to 12 GB.

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

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

  • Does Stable Diffusion XL support Ensemble models like in Comfy UI?

    -As of the current development stage, Stable Diffusion XL does not support Ensemble models. Therefore, you won't be able to use the refiner model which is available in Comfy UI.

  • How can I keep my Stable Diffusion XL installation up to date with the latest features and fixes?

    -To ensure you have the latest features and fixes, you should regularly run 'git pull' in the sdxl development branch. You can also check the comment history on GitHub for any new changes before pulling.

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

    -To install Stable Diffusion XL, visit the official repository of Automatic1111, clone the repository to your desired folder using the 'git clone' command, switch to the 'sdxl' development branch, and run the appropriate script for your operating system to download and install necessary files and packages.

  • How do I start using Stable Diffusion XL in the Automatic1111 web UI?

    -After installation, you can start using Stable Diffusion XL by running the web UI, selecting the 'sdxl 0.9' checkpoint from the checkpoints dropdown, and processing the file.

  • Where can I find the 'stxl 0.9 safe to store' file to complete the setup?

    -You can find the 'stxl 0.9 safe to store' file in the Hugging Face repository. You need to fill out a necessary form to gain access, after which you can download the file and complete the setup.

  • What are some future developments expected for Stable Diffusion XL?

    -The official release of Stable Diffusion XL is expected to include support for running on low VRAM devices, AMD devices, and M1/M2 MacBooks, which indicates ongoing optimization and expansion of compatibility.

Outlines

00:00

🚀 Introduction to Stable Diffusion XL in Automatic1111

The video introduces Stable Diffusion XL, a new feature for enhancing AI-generated images, which is now officially supported in the Automatic1111 web UI. Although still under refinement and not yet merged with the master branch, users can start using it to achieve impressive results. Before starting, prerequisites include installing Git and Python 3.10.6. Detailed instructions are provided for installing these on various operating systems, and for cloning the Automatic1111 repository and switching to the 'sdxl' development branch. The video also guides on running the web UI and processing files, and mentions the need to copy a specific file for model stability. It highlights that while the initial image may require refinement, increasing the resolution can significantly improve the output. The video notes that Stable Diffusion requires more VRM compared to other UIs and that optimization is ongoing. It also mentions that, unlike some other models, it does not currently support ensemble models like the refiner model. The video encourages viewers to stay updated with the latest features and fixes by regularly pulling updates from the development branch.

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. It is an upgrade from previous versions and is mentioned as being officially supported in the Automatic1111 web UI. In the context of the video, it represents the next level of AI-generated images that viewers are encouraged to explore.

💡Automatic1111

Automatic1111 refers to a web user interface that supports the use of AI models like Stable Diffusion XL for generating images. It is the platform where users can install and interact with Stable Diffusion XL to create images as described in the script.

💡Git

Git is a version control system that is used for software development to manage and keep track of code changes. In the video script, it is listed as a prerequisite for installing Stable Diffusion XL, indicating that users need to have Git installed on their systems to clone the repository containing the AI model.

💡Python 3.10.6

Python is a high-level programming language widely used for web development, data analysis, and more recently, for machine learning and AI applications. The script specifies Python 3.10.6 as a requirement for running Stable Diffusion XL, highlighting its importance in setting up the environment needed for the AI image generation process.

💡Repository

A repository in the context of software development is a collection of files and folders, including the code, that together form a project. The video instructs viewers to clone the Automatic1111 repository to install the AI model, emphasizing the role of repositories in distributing and managing software code.

💡Branch

In version control systems like Git, a branch represents a separate line of development within a repository. The script mentions switching to the 'sdxl development' branch, which is where the Stable Diffusion XL development is taking place, indicating that users should work within this specific branch to access the latest features and updates.

💡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 mentioned as one of the necessary files and packages that will be installed when setting up Automatic1111, suggesting its integral role in running the Stable Diffusion XL model.

💡Ensemble Models

Ensemble models in machine learning are formed by combining multiple models to improve predictive performance. The script notes that while Stable Diffusion produces impressive results, Automatic1111 currently does not support ensemble models, meaning that users won't be able to use the refiner model for additional image details within this interface.

💡Refiner Model

The refiner model is a specific type of ensemble model used to add details to generated images, particularly in areas like colors, faces, hands, and outfits. The video mentions that the refiner model is not supported in Automatic1111, which is a limitation when it comes to generating images with higher levels of detail.

💡Optimization

Optimization in the context of software and computing refers to the process of improving the efficiency and performance of a system. The script indicates that optimization is underway for Stable Diffusion XL to reduce the virtual memory (VRAM) requirements, which is currently higher compared to other UIs.

💡Virtual Memory (VRAM)

VRAM, or video random-access memory, is the memory used by a computer's graphics processing unit (GPU) to store image data. The script mentions that generating images with Stable Diffusion requires more VRAM, which is a consideration for users when setting up their systems to ensure they have sufficient memory for the AI image generation process.

💡GitHub

GitHub is a web-based platform for version control and collaboration that allows developers to work on projects and contribute to open-source software. The video encourages users to check the comment history on GitHub for updates and changes, highlighting its use as a platform for community engagement and project development.

Highlights

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

It's important to note that Stable Diffusion XL is still being refined and not yet merged with the master branch.

Prerequisites for installation include having Git and Python 3.10.6 installed.

Git can be easily installed from git.scm.com, with separate installers for different operating systems and CPU architectures.

Python 3.10.6 installation requires adding Python to the environment variables.

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

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

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

To enhance the setup, copy the 'stxl-0.9-safetostore' file to the model stable diffusion folder.

The 'stxl-0.9-safetostore' 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 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 way' to the command line args in the 'use IP.bat' script.

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

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

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 for additional detail.

The refiner model can make faces look similar, indicating room for improvement.

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.

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