Many companies have started integrating the stable diffusion model into their apps and services to generate images promptly. The functionality of Stable Diffusion is quite similar to OpenAI’s Dall-E, Adobe’s FireFly, Midjourney, and other similar tools. This article will provide a guide on how to install Stable Diffusion on Windows PCs.
Install stable diffusion on Windows PCs.
Before proceeding, we would like to mention that to get a good experience, your Windows machine should have a powerful graphics card like the RTX-40 series or higher. However, if you do not have a powerful desktop with the minimum requirement of 4GB of VRAM, note that it will not work with an integrated GPU. Those who cannot meet the minimum requirement for stable diffusion can use Google Services.
Download and install Python.
- First things first, download Python 3.10.6.
- Run the Python installer and check “Add Python to PATH” to allow access from the Command Prompt.
- After that, finish your installation and customize the options according to your preferences.
- Once it finishes, it should show “Setup was successful.”
- To check if Python is installed, open CMD, type “Python,” and hit enter. It should return the Python version installed on your desktop.
- If it does not respond with the Python version, restart and check again.
Install Git
After installing Python, you can proceed to download Git and install it on your computer.
Clone Web-UI
- Run CMD as an administrator and check that you are in your home directory by executing “cd %userprofile%.”
- Next, navigate to your user with “C:\Users\Username” (replace “Username” with your desktop username).
- You can also execute “cd %X%” to enter the correct file directory.
- After this, execute the Clone Web-UI command, “git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git.”
- In your File Explorer in your user folder, you will have a folder named “stable-diffusion-webUI.”
- %userprofile%\stable-diffusion-webui
- You will see a file named “Put Stable Diffusion Checkpoints Here.txt.”
- Now, download Stable Diffusion v1.5 and put the folder into the same folder in %userprofile%\stable-diffusion-webui.
Download the Stable Diffusion Model.
Now that we have finished setting up the developer environment for running the stable diffusion model on Windows PCs:
- Open “stable-diffusion-wbui” from your File Explorer and run “webui-user.bat.”
- It takes a few seconds to install the required tools to run Stable Diffusion, which will then open in the Command Prompt.
- Once it is finished, you can run it in your browser. The Command Prompt window will show a URL like http://127.0.0.1:7860.
How to Use and Run Stale Diffusion on Windows
To use Stale Diffusion on your desktop, you must open a web browser and go to http://127.0.0.1:7860 by typing it into the address bar. You can generate images at the prompt once it runs in the WebUI window.
You can adjust several parameters at a single prompt, including the image size and how many images you want to generate. For this, you have -formers, and if you have less than 8GB of VRAM, then execute -medium to save memory and generate more images at a time. To make these changes, replace the set COMMANDLINE_ARGS= with the set COMMANDLINE_ARGS=–formers –medium in webui-user.bat.
To update your project every time you run Stable Diffusion, edit the WebUI-user.bat and add the git pull before the last line. If you want to change the stable diffusion mode, we have Stale Diffusion v1 and Stable Diffusion v2, as these models are fine-tuned and trained on a massive database.