? Ready to dive into AI image generation but overwhelmed by technical jargon? This no-nonsense guide will walk you through installing Stable Diffusion on Windows, macOS, or Linux—even if you're a total newbie! Let's turn your creative prompts into stunning visuals. ??

install stable diffusion

How to Install Stable Diffusion Locally: System Requirements

Before we start, check if your device meets these specs:

  • ?? OS: Windows 10/11, macOS 12+, or Ubuntu 20.04+

  • ?? GPU: NVIDIA (6GB+ VRAM for smooth performance) or AMD with ROCm support

  • ?? RAM: 8GB minimum (16GB recommended)

  • ?? Storage: 20GB free space (models eat up space!)

Pro tip: Run nvidia-smi in your terminal to check GPU compatibility with CUDA.

How to Install Stable Diffusion in 7 Easy Steps

Step 1: Install Prerequisites

  • ?? Python 3.10: Download from the official site (skip Microsoft Store versions!).

  • ?? Git: Essential for cloning repositories.

  • ? CUDA Toolkit 12.x: Mandatory for NVIDIA GPU acceleration.

Step 2: Clone the Repository

Open your terminal and run:

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

This creates a stable-diffusion-webui folder.

Step 3: Set Up a Virtual Environment (Optional but Recommended)

Using Anaconda? Create a dedicated environment:

conda create -n sd_env python=3.10
conda activate sd_env

This avoids dependency conflicts.

Step 4: Install Dependencies

Navigate to the cloned folder and run:

pip install -r requirements.txt

Stuck? Update pip first with pip install --upgrade pip.

Step 5: Download Model Weights

Get your first model (e.g., v1-5-pruned-emaonly.safetensors) from:

  • Hugging Face

  • CivitAI

Save it to stable-diffusion-webui/models/Stable-diffusion.

Step 6: Launch the Web UI

For Windows:

webui-user.bat

For Linux/macOS:

./webui.sh

Wait for the magic link: http://localhost:7860 ??.

Step 7: Generate Your First Image

Type a prompt like "a cyberpunk cat wearing sunglasses" and hit Generate! Experiment with settings:

ParameterRecommended Value
Steps20-30
CFG Scale7-12
SamplerEuler a

?? Pro Tips for Smooth Operation

  • ?? Slow generation? Enable xformers in settings for 30% faster renders.

  • ?? Out of memory? Add --medvram to COMMANDLINE_ARGS in webui-user.bat.

  • ?? Want Chinese UI? Install the "Bilingual Localization" extension.

?? Troubleshooting Common Errors

  • "Torch not compiled with CUDA": Reinstall PyTorch with CUDA support.

  • "No module named xformers": Run pip install xformers.

  • "NSFW content detected": Add --disable-nsfw-filter to launch commands.