How to Install Stable Diffusion on Windows
Stable Diffusion lets you generate AI images locally on your Windows computer without relying on cloud services. This installation gives you complete control over the generation process and keeps your prompts private.
- Install Python 3.10. Download Python 3.10.11 from python.org and run the installer. Check 'Add Python to PATH' during installation. Open Command Prompt and type 'python --version' to verify installation shows Python 3.10.11.
- Install Git for Windows. Download Git from git-scm.com and install with default settings. This enables downloading the Stable Diffusion repository. Restart Command Prompt after installation to ensure Git commands work properly.
- Download AUTOMATIC1111 WebUI. Open Command Prompt and navigate to your desired installation folder. Run 'git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git' to download the interface. This creates a new folder named 'stable-diffusion-webui' containing all necessary files.
- Download a Stable Diffusion model. Go to huggingface.co/runwayml/stable-diffusion-v1-5 and download 'v1-5-pruned-emaonly.ckpt' (4.27 GB). Place this file in the 'stable-diffusion-webui/models/Stable-diffusion' folder. This model file contains the AI weights needed for image generation.
- Run the initial setup. Navigate to the 'stable-diffusion-webui' folder in Command Prompt. Run 'webui-user.bat' to start the first-time setup. The script automatically installs required dependencies including PyTorch and other libraries. This process takes 10-15 minutes depending on your internet connection.
- Access the web interface. After setup completes, the terminal shows 'Running on local URL: http://127.0.0.1:7860'. Open this address in your web browser to access the Stable Diffusion interface. The browser loads the generation controls where you can enter prompts and adjust settings.
- Generate your first image. Enter a descriptive prompt in the text box such as 'a red apple on a wooden table, photorealistic, high detail'. Leave other settings at defaults and click 'Generate'. Your first image appears in 30-60 seconds depending on your graphics card performance.