Run Stable Diffusion locally on Windows
I find the possibilities of AI fascinating. Haven't had a need to use it for any “real” project yet, but I keep coming back to mess around with it on my own time. Here's a simple guide to getting Stability AI's stable diffusion running on your own Windows machine.
Requirements
You will need:
- At least 10 GB of free hard disk space
- An NVIDIA GPU with at least 6 GB of RAM
- Python 3.10.6 and Git installed (make sure Python is added to your PATH)
- WebUI GitHub repository by AUTOMATIC1111
- Official Stable Diffusion checkpoints (watch out for v1.5 checkpoints at the end of September!)
- Checkpoints GFPGAN v1.3 (v1.4 might work too)
- Any additional ESRGAN models you may need. You can use as many as you like.
Instructions
- Clone the GitHub repository: https://github.com/AUTOMATIC1111/stable-diffusion-webui
- Download the official stable diffusion control points (you might need an account). Copy and paste sd-v1-4.ckpt into the stable-diffusion-webui folder from the previous section, then sd-v1-4.ckpt rename it to model.ckpt.
- Download the GFPGAN checkpoints (v1.3 or v1.4 should be fine). Place this GFPGANv1.3.pth file in the stable-diffusion-webui folder as you did with the sd-v1-4.ckpt file, but don’t rename it.
- Download ESRGAN checkpoints – as many as you like.
- Now you just need to double click on webui-user.bat in the main stable-diffusion-webui folder. A console window will appear and begin downloading all other important files, creating a Python environment, and setting up the web user interface.
- Once it's finished downloading, you should be able to open it at http://127.0.0.1:7860 (or the URL that displays in the console window).
Hope this was helpful! Huge thanks to this detailed article for getting me started. I'll update this with any tips and tricks I discover while generating my own images.