Open Journey
Tutorial15 min read

How to Run Stable Diffusion Locally: Complete Setup Guide

Learn how to run Stable Diffusion locally on your own PC or Mac with step-by-step instructions, hardware requirements, and the best UI options in 2024.

OJ

Open Journey Team

Jul 8, 2026


Running Stable Diffusion locally puts an incredibly powerful AI image generator directly on your own machine — no subscriptions, no queues, no restrictions on what you can create. But getting there requires navigating hardware requirements, software dependencies, and a maze of setup tools that can feel overwhelming for first-timers.

This guide walks you through everything you need to know to get Stable Diffusion running on your PC or Mac in 2024: what hardware you actually need, which interface to choose, the exact installation steps, and how to troubleshoot the most common problems. And if the local setup feels like too much work (or your hardware isn't quite there), we'll also show you a free alternative that gives you similarly styled images in seconds, right in your browser.

What Does "Running Stable Diffusion Locally" Actually Mean?

When people talk about how to run Stable Diffusion locally, they mean downloading the model weights and inference code to your own computer and generating images there — rather than paying for a cloud service like Midjourney or using a hosted demo.

The benefits are significant:

  • No per-image costs — once set up, generation is essentially free

  • Privacy — your prompts and images never leave your machine

  • No censorship or content restrictions — you control the model and the outputs

  • Custom models — you can load any checkpoint from Civitai, Hugging Face, or fine-tune your own

  • Unlimited batch sizes — generate dozens of images at once


The trade-off is that you need capable hardware, some patience during setup, and a willingness to troubleshoot when things go wrong. Let's make sure you're prepared.

Hardware Requirements: What You Actually Need

Before you spend time installing anything, confirm your machine can handle Stable Diffusion. The core requirement is GPU VRAM — not CPU speed, not RAM amount, not storage speed (though those help too).

GPU VRAM: The Critical Bottleneck

Stable Diffusion's base models (SD 1.5, SD 2.x) need at least 4 GB of VRAM to run at reduced settings. For comfortable use with full resolution and reasonable batch sizes, 8 GB is the sweet spot. SDXL and newer models like SD 3 want 12 GB or more.


VRAMWhat You Can RunPerformance







4 GBSD 1.5 with --lowvram flag, small batches, 512×512Slow, limited
6 GBSD 1.5 comfortably, SD 2.x with optimizationsDecent
8 GBSD 1.5 and SD 2.x well, SDXL with attention slicingGood
12 GBSDXL comfortably, most community modelsVery good
16 GB+SDXL full quality, large batches, inpainting/controlnetExcellent
24 GB+Everything, including FLUX and newest modelsProfessional

GPU Brand Matters

NVIDIA is the best-supported platform for Stable Diffusion by a large margin. CUDA acceleration is deeply integrated into the PyTorch stack that SD runs on. If you have an RTX 3060 or newer, you're in great shape.

AMD GPUs work through ROCm (Linux) or DirectML (Windows), but compatibility is patchier and performance lags behind equivalent NVIDIA cards. The community is improving this rapidly, but expect more troubleshooting.

Apple Silicon (M1/M2/M3/M4 Macs) runs Stable Diffusion through Metal/MPS acceleration and works surprisingly well. An M1 Pro with 16 GB unified memory is a solid local SD machine.

Intel Arc GPUs have experimental support via DirectML. Workable but not the smoothest experience.

Other Hardware Considerations

  • System RAM: 16 GB minimum, 32 GB recommended. The model weights need to be held in memory.

  • Storage: Model checkpoints are 2–7 GB each, and you'll want several. A 50–100 GB dedicated space on an SSD is practical.

  • CPU: Modern multi-core CPU helps with preprocessing but isn't the bottleneck. Even a mid-range i5/Ryzen 5 is fine.


Choosing Your Interface: AUTOMATIC1111 vs ComfyUI vs Others

The raw Stable Diffusion code is just a Python library — to use it practically, you run a web-based UI on top of it. There are several good options, each with different philosophies.

AUTOMATIC1111 WebUI (Most Popular)

AUTOMATIC1111's Stable Diffusion WebUI is the most widely used interface and the one most tutorials cover. It's a browser-based UI with a massive ecosystem of extensions — ControlNet, additional networks (LoRA), interrogators, upscalers, and hundreds more.

Pros:

  • Enormous community support and documentation

  • Extensions for almost everything

  • Relatively beginner-friendly for basic use


Cons:
  • Can feel cluttered as you add extensions

  • Sometimes slower generation than ComfyUI

  • Ongoing maintenance has had some hiccups


ComfyUI (Best for Power Users)

ComfyUI takes a node-based workflow approach. Instead of a traditional UI, you build graphs connecting prompt nodes to model nodes to sampler nodes to output nodes. It's more complex to learn but offers finer control and is generally faster.

Pros:

  • Very fast and memory-efficient

  • Supports the latest models (FLUX, SD3, etc.) faster than A1111

  • Highly customizable workflows


Cons:
  • Steeper learning curve

  • Less beginner-friendly initially


InvokeAI

A polished, more professional-feeling interface with a canvas-based workflow. Good middle ground between A1111 and ComfyUI.

Fooocus

Simplified interface that hides most settings and focuses on just generating great images quickly. Excellent for beginners who don't want to think about samplers and schedulers.

Our recommendation: Start with AUTOMATIC1111 if you want the widest community support and tutorials, or Fooocus if you just want to get generating quickly with minimal fuss.

How to Run Stable Diffusion Locally on Windows (AUTOMATIC1111)

This is the full step-by-step installation for Windows using AUTOMATIC1111's WebUI. Follow each step in order.

Step 1: Install Python 3.10

Stable Diffusion's WebUI works best with Python 3.10 specifically (not 3.11 or 3.12 — dependency compatibility issues).

  • Go to [python.org/downloads](https://www.python.org/downloads/release/python-31011/) and download Python 3.10.x

  • During installation, check the box that says "Add Python to PATH" — this is critical

  • Verify: open Command Prompt and type python --version. You should see Python 3.10.x


Step 2: Install Git

Git is needed to clone the WebUI repository and pull updates.

  • Download Git from [git-scm.com](https://git-scm.com/download/win)

  • Install with default settings

  • Verify: open Command Prompt and type git --version


Step 3: Install CUDA Toolkit (NVIDIA Only)

If you have an NVIDIA GPU, install the CUDA Toolkit matching your driver version.

  1. Check your driver version: right-click desktop → NVIDIA Control Panel → Help → System Information

  2. Download the compatible CUDA Toolkit from NVIDIA's developer site

  3. For most modern NVIDIA cards with recent drivers, CUDA 11.8 or 12.1 is appropriate


AMD users: ensure your ROCm drivers are installed. Apple Silicon users: skip this step — Metal support is built into PyTorch for macOS.

Step 4: Clone the AUTOMATIC1111 Repository

Open Command Prompt, navigate to where you want to install (e.g., your Documents folder), and run:

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

This creates a stable-diffusion-webui folder.

Step 5: Download a Model Checkpoint

The WebUI needs at least one model checkpoint to generate images. Two good starting points:

  1. Stable Diffusion 1.5: Download v1-5-pruned-emaonly.safetensors from Hugging Face (RunwayML's SD 1.5 repo)

  2. SDXL Base 1.0: Download sd_xl_base_1.0.safetensors from Stability AI's Hugging Face repo


Place the downloaded .safetensors (or .ckpt) file in stable-diffusion-webui/models/Stable-diffusion/

Step 6: Launch the WebUI

Navigate into the stable-diffusion-webui folder in Command Prompt and run:

webui-user.bat

The first launch takes 5–15 minutes as it downloads PyTorch, installs dependencies, and loads the model. Subsequent launches are much faster.

When you see Running on local URL: http://127.0.0.1:7860 in the terminal, open your browser and go to that address.

Step 7: Generate Your First Image

You're in. In the txt2img tab:

  • Enter a prompt like a photo of a sunset over mountains, golden hour, detailed

  • Add a negative prompt: blurry, low quality, distorted

  • Set Steps to 20, CFG Scale to 7

  • Hit Generate


Your first image should appear in 5–60 seconds depending on your hardware.

How to Run Stable Diffusion Locally on Mac (Apple Silicon)

Apple Silicon Macs use a different but increasingly well-supported path.

Using AUTOMATIC1111 on Mac

  • Install Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  • Install Python and Git: brew install python@3.10 git

  • Clone the repo: git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

  • Navigate into the folder: cd stable-diffusion-webui

  • Place your model in models/Stable-diffusion/

  • Run: ./webui.sh


The script detects macOS and configures MPS (Metal Performance Shaders) acceleration automatically. Expect generation times of roughly 2–5x slower than a comparable NVIDIA GPU, but still quite usable.

Using DiffusionBee (Easier Mac Option)

If the command-line setup feels daunting, DiffusionBee is a one-click Mac app that bundles everything together. Download, install, open — done. It's less customizable than A1111 but works immediately.

Using Low VRAM Flags and Optimizations

If you have less than 8 GB of VRAM, you'll need optimization flags. Edit webui-user.bat (Windows) or webui.sh (Mac/Linux) and add flags to the COMMANDLINE_ARGS line:


FlagEffectUse When






--lowvramMoves model parts to CPU as needed4–6 GB VRAM
--medvramModerate VRAM optimization6–8 GB VRAM
--xformersMemory-efficient attention (NVIDIA)Always helpful on NVIDIA
--opt-split-attentionSplits attention calculationsAMD or when xformers unavailable
--no-halfFull precision (slower, more VRAM)Fix weird artifacts on some GPUs

Example for a 6 GB NVIDIA card:
set COMMANDLINE_ARGS=--medvram --xformers

Loading Custom Models, LoRAs, and Embeddings

One of the biggest advantages of running locally is access to the enormous ecosystem of community-created models and fine-tunes.

Finding Models

  • Civitai (civitai.com): The largest repository of community fine-tuned models. You'll find photorealistic models, anime styles, artistic styles, character models, and much more.

  • Hugging Face (huggingface.co): Official and research models, including all official Stability AI releases.


Installing Models

  • Checkpoints (full models, .safetensors/.ckpt): Place in models/Stable-diffusion/

  • LoRAs (lightweight style adapters): Place in models/Lora/

  • Textual Inversions (embeddings): Place in embeddings/

  • VAEs (affect color/sharpness): Place in models/VAE/


After placing files, click the refresh icon in the WebUI and the new models appear in their respective dropdowns.

Using LoRAs in Prompts

To activate a LoRA in a prompt, use the syntax: . For example: a portrait of a woman, studio lighting

The weight (0.1–1.5 typically) controls how strongly the LoRA influences the output. Start at 0.8 and adjust to taste.

Useful Extensions to Install First

AUTOMATIC1111's extension ecosystem is one of its greatest strengths. Here are the most commonly used:

ControlNet

ControlNet lets you guide image composition with reference images — controlling pose, depth, edge structure, and more. It's transformative for getting consistent results.

Install: Extensions tab → Install from URL → paste https://github.com/Mikubill/sd-webui-controlnet

Ultimate SD Upscale

Upscales images to higher resolutions while adding detail through img2img tiling. Essential for getting print-quality outputs from your generations.

ADetailer

Automatically detects and fixes faces and hands in generated images — two of Stable Diffusion's historic weaknesses.

Regional Prompter

Lets you specify different prompts for different spatial regions of the image. Useful for multi-character scenes or controlling foreground/background independently.

Troubleshooting Common Issues

Even with a clean setup, you'll likely hit at least one of these problems.

"CUDA out of memory" Error

Your GPU ran out of VRAM mid-generation.

  • Add --medvram or --lowvram to your launch flags

  • Reduce image resolution (start at 512×512)

  • Reduce batch size to 1

  • Enable --xformers if on NVIDIA


Black or Green Images

Usually indicates a VRAM issue where the model couldn't fully load.

  • Try adding --no-half to your launch arguments

  • This forces full precision, which uses more VRAM but fixes the issue on some cards


"Model failed to load" Error

  • Verify the model file is in the correct folder

  • Check the file isn't corrupted (re-download if checksum fails)

  • Ensure you have enough VRAM for the model size


Very Slow Generation

  • Verify your GPU is being used: check the terminal — it should mention CUDA or MPS

  • If generating on CPU accidentally, add the correct flags or check your PyTorch installation

  • On NVIDIA, install xformers for significant speedup


WebUI Won't Start

  • Python version issues are the most common cause — confirm you're on Python 3.10.x

  • Try deleting the venv folder inside the webui directory and restarting — it will recreate

  • Check the terminal for the specific error message and search for it in the AUTOMATIC1111 GitHub issues


Stable Diffusion Local vs Cloud-Based AI Image Generators

Running locally is powerful, but it's not the right choice for everyone. Here's an honest comparison:


FactorLocal Stable DiffusionCloud AI Generators









Cost over timeFree (after hardware)Subscription or credits
Setup difficultyMedium to highNone
SpeedDepends on GPUFast and consistent
PrivacyCompleteVaries by provider
Model varietyEnormousLimited to platform's models
Requires good GPUYesNo
Uptime/reliabilityYour hardwarePlatform managed
Updates and new modelsManualAutomatic

The conclusion: local setup is worth it if you're a power user who wants control, privacy, and variety. For casual creators who just want great images quickly, a good cloud-based alternative is far simpler.

The Easy Alternative: Open Journey

If you want that same Stable Diffusion-inspired image quality without any of the setup overhead, Open Journey is worth bookmarking. It's a free, open-source AI image generator fine-tuned on Stable Diffusion to produce a distinctive Midjourney-like artistic quality from plain English prompts.

You don't need to install Python, configure CUDA, or find a model checkpoint. You just type what you want to see and get a result in around 4 seconds.

Open Journey supports over 20 art styles — photorealistic, anime, oil painting, watercolor, pixel art, cinematic, digital art, and more — and every image you create comes with full commercial rights. No subscription required to get started, no credit card.

It's not a replacement for a local Stable Diffusion setup if you need complete control, custom models, or processing thousands of images. But for most creatives, it covers the 90% use case immediately, without the setup friction.

---

Frequently Asked Questions

How much VRAM do I need to run Stable Diffusion locally?

The practical minimum is 4 GB of VRAM for SD 1.5 with optimization flags enabled, but generation will be slow and you'll be limited to smaller image sizes. 8 GB is the comfortable sweet spot for SD 1.5 and SD 2.x, while SDXL performs best with 12 GB or more. If you're on a laptop with 4–6 GB of VRAM, you can still run it — just with patience.

Can I run Stable Diffusion locally on a CPU without a GPU?

Yes, but it's extremely slow — generating a single 512×512 image can take 5–20 minutes on a modern CPU versus 5–30 seconds on a GPU. If you don't have a compatible GPU, a cloud-based tool like Open Journey will give you results far faster while you save for a GPU upgrade.

Is running Stable Diffusion locally legal?

Yes. The Stable Diffusion models are released under open licenses that allow local use. The CreativeML Open RAIL-M license for SD 1.x/2.x permits personal and commercial use with some restrictions on harmful use cases. SDXL uses a CreativeML Open RAIL++-M license. Always check the specific license for any community model you download from Civitai or Hugging Face.

What's the difference between Stable Diffusion 1.5, 2.1, and SDXL?

SD 1.5 is the oldest but has the largest ecosystem of fine-tuned models and LoRAs, making it extremely versatile. SD 2.1 improved quality in some areas but has a smaller community ecosystem. SDXL (1.0) is significantly larger (6.9B parameters vs 890M) and produces higher quality images by default, particularly for complex prompts and photorealism, but requires more VRAM. For raw image quality, SDXL wins. For model variety and community resources, SD 1.5 still leads.

How long does the initial setup take to run Stable Diffusion locally?

Budget 30–90 minutes for a first-time setup. This includes installing Python and Git (10–15 minutes), cloning the repository (5 minutes), downloading a model checkpoint (10–30 minutes depending on your internet speed — models are 2–7 GB), and the first-launch dependency installation (10–20 minutes). Subsequent launches take 30–60 seconds.

Can I run multiple Stable Diffusion models and switch between them?

Yes. You can have as many model checkpoints as your storage allows in the models/Stable-diffusion/ folder. In the WebUI, there's a model dropdown at the top where you can switch between them without restarting the server. Switching models takes 10–60 seconds as the new weights load into VRAM.

Conclusion: Get Started Today

Learning how to run Stable Diffusion locally is one of the most empowering things you can do as a creative who works with AI-generated images. Once it's running, you have access to a virtually unlimited image generation engine, thousands of community models, and complete control over your creative process — all free, all private, all on your own hardware.

The setup path is clear: confirm your hardware meets the requirements (8 GB VRAM recommended), install Python 3.10 and Git, clone AUTOMATIC1111 or your preferred UI, drop in a model checkpoint, and launch. Add optimization flags if needed, install ControlNet and a few key extensions, and you'll have a professional-grade local AI image studio.

If your hardware isn't there yet, or you'd rather start generating immediately while you set up your local environment, try Open Journey free today. It delivers Stable Diffusion-quality artistic images in your browser in about 4 seconds, across 20+ art styles, with full commercial rights on every image — no credit card, no setup, no waiting. It's the fastest path from prompt to picture, and a great tool to run alongside your local setup for quick ideation.

Whether you go local, cloud-based, or both — the best time to start creating is right now.

OJ

Open Journey Team

The Open Journey team is dedicated to making AI art accessible to everyone. We share tutorials, tips, and insights to help you create stunning AI-generated artwork.

Related Articles

Tutorial

Stable Diffusion Tutorial: Complete Beginner's Guide (2024)

Tutorial

How to Use Midjourney: Complete Beginner's Guide (2024)

Tutorial

How to Make AI Art: A Complete Beginner's Guide (2024)

Ready to create?

Start generating stunning AI art today. No credit card required.

Try Open Journey Free