How to Install Stable Diffusion Locally On Windows

Run Stable Diffusion Locally on Windows (2026 Guide)

Running Stable Diffusion locally on Windows allows you to generate AI images directly on your computer without relying on cloud services. This gives you more control, faster image generation, and improved privacy.

In this guide, you’ll learn the easiest way to install and run Stable Diffusion on Windows in 2026.

💾 VRAM Reality Check: What Can Your GPU Run in 2026?

Not all GPUs are equal. Here’s what you can actually run based on your VRAM:

VRAMSD 1.5SDXLSD 3.5 MediumSD 3.5 LargeFlux.1
4-6 GB⚠️ (–medvram)
6-8 GB✅ (–medvram)⚠️ (–lowvram)
8-12 GB✅ (fp8)⚠️ (–medvram)
12-16 GB✅ (fp8)⚠️
16-24 GB✅ (fp8)

💡 Pro tip: Use --medvram or --lowvram flags to push your GPU one tier higher. Quantized (FP8) models also reduce VRAM usage by ~40%.

System Requirements

Component Recommended
GPU NVIDIA GPU with 6GB+ VRAM
RAM 16GB
Storage 20GB free space
Operating System Windows 10 / Windows 11
Python Python 3.10
Tip: If you have a lower VRAM GPU, you can still run Stable Diffusion using optimization flags such as –medvram or –lowvram.

Best Interfaces for Stable Diffusion

AUTOMATIC1111 WebUI
Best for beginners and the most widely used interface.

ComfyUI
Better for advanced workflows and automation.

Step 1 – Install Required Software

🐍 CRITICAL: Python 3.10.6 is MANDATORY

Python 3.11 and 3.12 will break your installation. The dependencies (Torch, xformers) are not compatible with newer versions. Download Python 3.10.6 here and check “Add to PATH”.

Install Python

Download Python 3.10 and install it.

During installation make sure you check “Add Python to PATH”.

Install Git

Git allows you to download the Stable Diffusion repository and update it easily.

Step 2 – Download Stable Diffusion WebUI

Open Command Prompt and run the following command:

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

Then move into the folder:

cd stable-diffusion-webui

Step 3 – Launch Stable Diffusion

Inside the folder, double-click the following file:

webui-user.bat

The first launch will automatically install all dependencies and required packages.

Once finished, open this address in your browser:

http://127.0.0.1:7860

Step 4 – Download a Model

Stable Diffusion requires a model checkpoint file to generate images.

After downloading a model (.safetensors file), place it in:

stable-diffusion-webui/models/Stable-diffusion

Restart the WebUI and select the model from the dropdown menu.

📥 Model Safari: Where to Download Safe Models

🏆 Civitai.com

Largest community hub. Filter by “safetensors” only. Check ratings and previews before downloading.

🤗 Hugging Face

Official Stability AI releases. Get SD 3.5, Flux.1, and base models directly from the source.

⚠️ CRITICAL SAFETY RULE

Only download .safetensors files. Avoid .ckpt files from untrusted sources — they can contain malware. Civitai and Hugging Face both scan files for security.

📂 Where to Put Downloaded Models

stable-diffusion-webui-forge\models\Stable-diffusion\

After placing the file, restart the UI and select your model from the dropdown.

💡 Pro Tips for 2026 Models

  • SD 3.5 Large → Use FP8 quantized versions (reduces VRAM from 16GB → 10GB)
  • Flux.1 → Look for “fp8” or “GGUF” variants for better performance on 12GB cards
  • Juggernaut XL → Best all-purpose realistic model for beginners

Step 5 – Generate Your First Image

Inside the interface:

  • Enter your prompt
  • Select resolution (512×512 recommended)
  • Click Generate
a futuristic cyberpunk city at night, neon lights, ultra detailed, cinematic lighting

⚡ Speed & VRAM Optimization Flags (2026)

Edit your webui-user.bat and add these to COMMANDLINE_ARGS=:

  • --xformers → 30-50% speed boost, reduces VRAM (NVIDIA only)
  • --opt-sdp-attention → Alternative to xformers, works on newer GPUs
  • --medvram → Use if you have 6-8GB VRAM
  • --lowvram → Use if you have 4-6GB VRAM
  • --opt-sub-quad-attention → Improves memory for SDXL/SD3.5

Example for RTX 3060 (12GB): COMMANDLINE_ARGS=--xformers --opt-sdp-attention --medvram

Optimization for Low VRAM GPUs

Edit the file webui-user.bat and add:

–medvram

or

–lowvram

🟦 AMD GPU Users: DirectML Setup Guide

If you have an AMD Radeon GPU (RX 6000/7000 series), here’s how to get Stable Diffusion running on Windows:

✅ Method 1: Easiest – Stability Matrix

Download Stability Matrix (one-click manager). During setup, select “DirectML” backend. It handles everything automatically.

⚙️ Method 2: Manual Forge/A1111 Install

After installing Python 3.10.6 and Git:

pip install torch-directml
# Then launch with:
webui-user.bat --use-directml

⚠️ Important Notes for AMD Users:

  • Expect 30-50% slower performance than NVIDIA GPUs
  • Use --medvram or --lowvram flags for 8GB or less VRAM
  • For best performance: Consider Linux + ROCm setup (2-3x faster)
  • Intel Arc users: Use --use-ipex flag with pip install intel-extension-for-pytorch

Common Installation Errors

Python Version Error
Make sure you installed Python 3.10.
CUDA / Torch Errors
Update your GPU drivers and reinstall dependencies.
Out of Memory Error
Lower image resolution or use the VRAM optimization flags.

⚠️ Fix: webui-user.bat Opens and Closes Immediately

This is the #1 frustration for Windows users. Here’s how to diagnose and fix it:

  1. Pause the script: Edit webui-user.bat and add pause on a new line at the end. Run again — the error will stay visible.
  2. Python not in PATH: If you see 'python' is not recognized, reinstall Python 3.10.6 and check “Add Python to PATH”.
  3. Git missing: If you see 'git' is not recognized, install Git for Windows.
  4. Manual Python path fix: Add this to the top of your .bat file:
    set PYTHON=C:\Users\[YourName]\AppData\Local\Programs\Python\Python310\python.exe

👉 Still stuck? Check our full Troubleshooting Guide.

Final Thoughts

Running Stable Diffusion locally on Windows gives you full control over AI image generation. Once installed, you can experiment with different models, prompts, extensions, and advanced workflows.

To expand your capabilities, explore tools like ControlNet, LoRA models, and advanced workflows.

Stable Diffusion Local Installation Hub – Complete Guide

Complete Stable Diffusion Local Installation Hub

Everything you need to run Stable Diffusion offline on Windows, Mac, or Linux. Choose your platform below for step-by-step guides.

Not Sure Which Guide to Choose?

Quick tip: Most beginners should start with the Windows (Forge) or Mac (Draw Things) guides for the easiest setup. Choose Linux if you’re comfortable with terminal commands.

Windows Installation Guide

Difficulty: Beginner to Intermediate
  • Best for NVIDIA GPU users
  • Forge (A1111 optimized) & ComfyUI options
  • Highest performance & most extensions
Open Windows Guide

Mac Installation Guide

Difficulty: Beginner (Easiest)
  • Optimized for Apple Silicon (M1/M2/M3/M4)
  • Draw Things app (App Store) & terminal options
  • Simplest setup – start generating in minutes
Open Mac Guide

Linux Installation Guide

Difficulty: Intermediate to Advanced
  • Best for AMD GPU users (ROCm support)
  • A1111 & ComfyUI with terminal setup
  • Maximum flexibility & customization
Open Linux Guide

Quick Platform Comparison

Platform Best For Setup Time Hardware Requirement Recommended Interface
Windows Maximum performance, NVIDIA GPU users 15-30 minutes NVIDIA GPU (6GB+ VRAM) Forge (A1111 optimized)
Mac Apple Silicon users, simplicity 2-10 minutes M1/M2/M3 with 16GB+ RAM Draw Things (App Store)
Linux Advanced users, AMD GPU, customization 15-40 minutes Any with terminal knowledge ComfyUI or A1111

🤔 Which Interface Should You Start With?

Choose AUTOMATIC1111 / Forge if: You want the most extensions, a familiar tabbed interface, and easy LoRA/ControlNet access.

Choose ComfyUI if: You have low VRAM (6-8GB), want to run Flux/SD3.5 efficiently, or plan to build complex, repeatable workflows.

💡 Many advanced users run both: Use Forge for quick experiments, ComfyUI for production workflows. See our 2026 Model Benchmarks guide for performance comparisons →

Additional Resources

Stable Diffusion Negative Prompts Guide

Master negative prompting to eliminate artifacts, fix anatomy issues, and generate perfect AI images. Get categorized prompt collections and advanced techniques.

  • Eliminate artifacts and anatomy issues
  • Advanced prompting techniques
  • Categorized prompt collections

Stable Diffusion Models Guide

Learn where to download safe models (SD 3.5, Flux.1, custom checkpoints) and how to manage them effectively for optimal results.

  • SD 3.5, Flux.1, and custom checkpoints
  • Safe download sources & management

Troubleshooting Common Issues

Fix black images, out of memory errors, slow generation, and other common problems with step-by-step solutions.

  • Fix black images & out of memory errors
  • Optimize generation speed

Prompting & Advanced Techniques

Master prompt engineering, ControlNet, LoRAs, upscaling, and other advanced features to create professional-grade AI artwork.

  • Prompt engineering mastery
  • ControlNet, LoRAs & upscaling