Successfully install Easy Diffusion (Stable Diffusion) on Windows system and realize AI generation of artistic images

Recently, AI drawing is very popular, and some online tools have been tried, but the number of free online tools is limited. If you want to get more use times, the price you need to pay is not cheap. Mo Tao learned that the local AI can draw "artistic images" by building a "Stable Diffusion", so there is no need to pay high fees.

 Successfully install Easy Diffusion (Stable Diffusion) on Windows system and realize AI generation of artistic images

What is Stable Diffusion

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

Stable Diffusion can generate very beautiful and complex works of art. Its applications include art creation, image generation, visual effect design, etc. If you are interested in this, you can search online for more information, or try to use this tool for artistic creation.

Before you start

I searched the website for the construction process of "Stable Diffusion", and found that the process was very complicated, which made me want to give up. Just as I was about to give up, I found a project named "Easy Diffusion" on Github. It provides various environments, models and other dependencies required for one click installation of Stable Diffusion, which greatly reduces the difficulty of installation.

This article aims to share and record the process of installing "Easy Diffusion" in xiaoz. Although this tool simplifies many steps, the installation is still difficult. It is recommended that friends who have some knowledge of computers try it.

preparation

  1. TZ that can access the Internet scientifically (Github can be accessed)
  2. For a computer with not too bad configuration, the higher the CPU and graphics card configuration, the better (the configuration of xiaoz is AMD 3600+RTX 3050 is barely enough)
  3. I have heard of HTTP proxy and know how to use it (SS can be converted to HTTP proxy, please study it yourself)

Download Easy Diffusion

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

Subsequent updates can be viewed here: https://github.com/cmdr2/stable-diffusion-ui/releases

Set HTTP proxy

Easy Diffusion will download a large amount of content from foreign networks, such as Python environment, drawing models, etc. It is difficult or almost impossible to access the domestic network, so we need to make the command line of Windows scientifically accessible.

Open your CMD command line and enter the following command to set 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 For your HTTP proxy address, if you don't know what it is, it is recommended to give it up directly.

Installing Easy Diffusion

Download the compressed package above stable-diffusion-ui-windows.zip Extract to any directory. then:

  1. open stable-diffusion-ui catalog
  2. Double click to run Start Stable Diffusion UI.cmd This script

The next step is a long wait. There may be some mistakes. I have sorted out the mistakes I encountered below.

If you are prompted that the Python package download timed out:

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

It can be solved by setting the pip image source. Easy Diffusion will install a Python 3.8 environment for you separately. We need to set the pip image source. The following command sets the pip image source of Easy Diffusion as an AliCloud image:

 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 a model download failure prompt error, you can directly go to Google or Github to search the name of the model and download it, and then put it in models In the specified directory.

 Successfully install Easy Diffusion (Stable Diffusion) on Windows system and realize AI generation of artistic images  Successfully install Easy Diffusion (Stable Diffusion) on Windows system and realize AI generation of artistic images

I sorted out some model download addresses:

When the Easy Diffusion installation encounters an error, please read the error message. Then you can try to solve the problem manually by the above method. After the problem is solved manually, run again Start Stable Diffusion UI.cmd The script is sufficient.

During the installation process, xiaoz encountered the problem of Python package installation timeout and model download error, which has been successfully solved manually through the above methods. Everyone's situation is different. It is suggested to be flexible and search for solutions online.

Run Easy Diffusion

The browser address will be opened automatically after successful installation http://localhost:9000/ After seeing the WEB interface, you can generate "art images" according to your preferences. Some specific usage methods are still under further study. Welcome to leave a message and discuss.

 Successfully install Easy Diffusion (Stable Diffusion) on Windows system and realize AI generation of artistic images

Cancel HTTP proxy

After installation, we can cancel the HTTP proxy on the Windows command line:

 set http_proxy= set https_proxy=

Some contents of this article refer to: https://github.com/cmdr2/stable-diffusion-ui

Original article by Mo Tao, if reproduced, please indicate the source: https://imotao.com/7308.html

fabulous (3)
 Head of Mo Tao Mo Tao
Previous March 5, 2023
Next March 6, 2023

Related recommendations

Post reply

Your email address will not be disclosed. Required items have been used * tagging

This site uses Akismet to reduce spam comments. Learn how we handle your comment data

Comment list (3)

  •  Humble head
    humble 6:24 p.m., April 10, 2023

    Error while loading stable-diffusion model: model_manager.py:46
    D:\stable_diffussion\models\stable-diffusion\sd-v1-4.ckpt
    18:16:06.937 ERROR cuda:0 Error: Unable to load weights from pytorch checkpoint file for model_manager.py:47
    ‘D:\stable_diffussion\profile/.cache\huggingface\hub\models–openai–clip-vit-large-patch14\snapshot
    s\8d052a0f05efbaefbc9e8786ba291cfdf93e5bff\pytorch_model.bin’ at
    ‘D:\stable_diffussion\profile/.cache\huggingface\hub\models–openai–clip-vit-large-patch14\snapshot
    s\8d052a0f05efbaefbc9e8786ba291cfdf93e5bff\pytorch_model.bin’. If you tried to load a PyTorch model
    from a TF 2.0 checkpoint, please set from_tf=True.
    18:16:06.941 ERROR cuda:0 Consider removing the model from the model folder. How to solve this problem?

  •  Head of Three Stones
    Three Stones 3:31 p.m., May 13, 2023

    Error: Unexpected Read Error:
    Error:undefined
    EventInfo: {
    “reader”: {}
    }

    Error: The model for Stable Diffusion has not been loaded yet! If you’ve tried to load it, please check the logs above this message for errors (while loading the model).
    How to solve this problem

  •  Large head portrait
    substantially 6:06 p.m. on July 4, 2023

    Your website has been hung up. I just saw that there are two words "grass and pomegranate" in the title