Successfully Installing Easy Diffusion (Stable Diffusion) on Windows System and Achieving AI-generated Artistic Images

Publish: 2023-02-26 | Modify: 2023-02-26

Recently, AI drawing has become very popular. I tried some online tools, but the free usage is limited, and the price for more usage is not cheap. Xiaoz found that "Stable Diffusion" can be built locally to achieve local AI drawing of "artistic images", so there is no need to pay a high price, hehe.

Image

What is Stable Diffusion

Stable Diffusion is developed by computer scientists and artists. It uses deep learning algorithms and stable diffusion processes to generate artistic images. Specifically, it uses an algorithm called random walk to create images, which simulates the random changes in pixel values to simulate the path wandering in the stable diffusion process. The algorithm also uses neural network technology to learn and generate different image styles.

Stable Diffusion can generate beautiful and complex works of art, and its applications include art creation, image generation, visual effects design, etc. If you are interested in this, you can search online for more information or try using the tool for artistic creation.

Before we begin

After searching online for the process of building "Stable Diffusion", I found that the process is very complicated, and I almost gave up. Just when I was about to give up, I found a project called "Easy Diffusion" on Github. It provides various dependencies such as one-click installation of Stable Diffusion, which greatly reduces the installation difficulty.

This article aims to share and record Xiaoz's installation process of "Easy Diffusion". Although this tool simplifies many steps, the installation still has a certain difficulty. It is recommended that friends who have a certain understanding of computers give it a try.

Preparation

  1. A TZ that can access the Internet (can access Github) with scientific methods
  2. A computer with a decent configuration, the higher the CPU and graphics card configuration, the better (Xiaoz's configuration is AMD 3600 + RTX 3050, barely enough)
  3. Have heard of HTTP proxy and know how to use HTTP proxy (you can convert ss to HTTP proxy, please study it yourself)

Download Easy Diffusion

Download link: https://github.com/cmdr2/stable-diffusion-ui/releases/download/v2.5.15/stable-diffusion-ui-windows.zip

You can check for updates here: https://github.com/cmdr2/stable-diffusion-ui/releases

Set up HTTP proxy

Easy Diffusion will download a large amount of content from foreign networks, such as Python environment, drawing models, etc., which are difficult or almost impossible to access on domestic networks. Therefore, we need to let the Windows command line access the Internet with scientific methods.

Open your CMD command line and enter the following command to set up the HTTP proxy:

set http_proxy=http://127.0.0.1:10809
set https_proxy=http://127.0.0.1:10809

http://127.0.0.1:10809 is your HTTP proxy address. If you don't know what it is, it is recommended to give up.

Install Easy Diffusion

Unzip the downloaded zip file stable-diffusion-ui-windows.zip to any directory. Then:

  1. Open the stable-diffusion-ui directory
  2. Double-click to run the Start Stable Diffusion UI.cmd script

Next is a long wait, and there may be some errors. I have summarized the errors I encountered below.

If it prompts a timeout error when downloading Python packages:

HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

You can solve it by setting the pip mirror source. Easy Diffusion will install a separate Python 3.8 environment for you, and we need to set the pip mirror source. The following command sets the pip mirror source of Easy Diffusion to Aliyun mirror:

cd D:\stable-diffusion-ui\installer_files\env\Scripts
d:
pip.exe config set global.index-url https://mirrors.aliyun.com/pypi/simple/

If you encounter an error prompt for failed model download, you can directly search for the model's name on Google or Github to download it, and then put it in the specified directory of models.

Image Image

I have compiled some model download links:

When encountering errors during the installation of Easy Diffusion, pay attention to the error prompt information, and then try to solve it manually through the above method. After manually solving it, run the Start Stable Diffusion UI.cmd script again.

During the installation process, Xiaoz encountered problems such as Python package installation timeout and model download errors, and has successfully solved them manually through the above method. Everyone's situation is different, so it is recommended to be flexible and search for solutions online.

Run Easy Diffusion

After successful installation, the browser address http://localhost:9000/ will automatically open the WEB interface. You can now generate "artistic images" according to your preferences. Xiaoz is further researching some usage methods. Feel free to leave a comment to discuss.

Image

Cancel HTTP proxy

After the installation is complete, we can cancel the HTTP proxy of the Windows command line:

set http_proxy=
set https_proxy=

This article refers to: https://github.com/cmdr2/stable-diffusion-ui


Comments