Current location: Home> Ai Course> AI Deep Learning

How to deploy Stable Diffusion on Windows? (AUTOMATIC1111)

Author: LoRA Time: 16 Jan 2025 1009

u=1136685664,2322465283&fm=225&app=113&f=JPEG_副本.jpg

Stable Diffusion is a powerful open source text-to-image generation model, and AUTOMATIC1111 's WebUI provides a user-friendly graphical interface, which greatly simplifies the use process. Below are the detailed steps on how to manually install Stable Diffusion WebUI on Windows systems.

Preparation

Before installing, make sure your computer meets the following requirements:

  • Operating system : Windows 10 or Windows 11 (64-bit)

  • Graphics Card : NVIDIA discrete graphics card (recommended for best performance). Although it can also be run on the CPU, it is slower. AMD graphics cards require additional configuration.

  • Graphics driver : Please make sure your NVIDIA graphics driver is updated to the latest version.

  • Hard drive space : at least 10GB of free space (for models and other files). At least 20GB or more is recommended.

  • Internet connection : A stable Internet connection as some files need to be downloaded.

Installation steps

1.Install Python

  • Visit the Python official website to download Python 3.10.6 version (recommended).

  • During the installation process, make sure to check the "Add Python to PATH" option.

  • After the installation is complete, open the command prompt (CMD) or PowerShell and enter python --version to check whether Python is installed successfully.

2. Install Git

  • Visit the Git official website to download and install Git for Windows .

  • Just use the default settings during installation.

  • After the installation is complete, open a command prompt or PowerShell and enter git --version to check whether Git is installed successfully.

3. Clone the Stable Diffusion WebUI repository

  • In the directory where you want to install Stable Diffusion, open a command prompt or PowerShell and run the following command to clone the repository:

     git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

4. Enter the WebUI directory

  • Use the following command to enter the cloned stable-diffusion-webui directory:

     cd stable-diffusion-webui

5. Install dependencies

  • Run the following command to install the required Python libraries:

     pip install -r requirements_versions.txt

    If you encounter problems, you can try:

     pip install -r requirements.txt

    This process may take some time, please be patient.

6. Download the Stable Diffusion model

  • Visit websites such as Hugging Face or Civitai to download the Stable Diffusion model file (in the format of .ckpt or .safetensors ).

  • Place the downloaded model file into stable-diffusion-webui/models/Stable-diffusion directory.

7. Run WebUI

  • In the stable-diffusion-webui directory, double-click to run the webui-user.bat file.

  • On first run, WebUI downloads some additional dependencies and may take a long time.

  • After the startup is completed, the command line window will display a local URL, such as http://127.0.0.1:7860/ .

  • Open this URL in your browser to access Stable Diffusion WebUI .

One-click installation package (optional)

If you don't want to install Python and Git manually, you can choose to use a one-click installation package provided by a third party. These installation packages usually integrate all necessary components to simplify the installation process. Please note that when using third-party installation packages, be sure to download them from trusted sources to avoid potential risks.

Frequently asked questions and solutions

  • The command line interface is stuck after startup It may be due to network problems that cause the download of dependencies to fail. Please check the network connection, or try changing the network environment.

  • Insufficient video memory You can use the following methods to reduce video memory usage:

    • Reduce the resolution of the generated image

    • Use smaller models

    • Speed up using xformers

  • Other problems If you encounter other problems, you can seek help in the relevant forums or communities of Stable Diffusion .

Through the above steps, you can successfully install Stable Diffusion WebUI on your Windows system and start enjoying the powerful function of text-to-image generation!

FAQ

Who is the AI course suitable for?

AI courses are suitable for people who are interested in artificial intelligence technology, including but not limited to students, engineers, data scientists, developers, and professionals in AI technology.

How difficult is the AI course to learn?

The course content ranges from basic to advanced. Beginners can choose basic courses and gradually go into more complex algorithms and applications.

What foundations are needed to learn AI?

Learning AI requires a certain mathematical foundation (such as linear algebra, probability theory, calculus, etc.), as well as programming knowledge (Python is the most commonly used programming language).

What can I learn from the AI course?

You will learn the core concepts and technologies in the fields of natural language processing, computer vision, data analysis, and master the use of AI tools and frameworks for practical development.

What kind of work can I do after completing the AI ​​course?

You can work as a data scientist, machine learning engineer, AI researcher, or apply AI technology to innovate in all walks of life.