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.
- Difficulty
- Intermediate
- Time
- 30 minutes
Step by step
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.
Note: Avoid Python 3.11 or newer — Stable Diffusion has compatibility issues with these versions.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.
Note: Choose a folder path without spaces or special characters to avoid potential issues.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.
Note: Civitai.com offers thousands of alternative models with different artistic styles and capabilities.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.
Note: Add '--xformers' to COMMANDLINE_ARGS in webui-user.bat for faster generation on NVIDIA cards with 4GB+ VRAM.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.
Note: Bookmark this local address — you'll use it every time you run Stable Diffusion.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.
Note: Use negative prompts like 'blurry, low quality, distorted' to improve image quality by telling the AI what to avoid.