Can I run stable-diffusion-xl-base-1.0 locally?
stabilityai/stable-diffusion-xl-base-1.0stable-diffusion-xl-base-1.0 is a text-to-image (diffusion) model with about 2.6B parameters. The practical minimum to run it is roughly 8.2 GB of GPU or system memory, and a GPU with ≥ 9 GB VRAM runs it comfortably. Here's exactly what it needs and how to run it.
Check YOUR exact machinestable-diffusion-xl-base-1.0 memory & VRAM requirements
How much memory stable-diffusion-xl-base-1.0 needs at each quantization level (weights plus ~20% runtime overhead). Lower-bit quantization dramatically reduces VRAM at a small quality cost.
| Precision | Memory needed | Notes |
|---|---|---|
| Image pipeline | 8.2 GB | — |
Will stable-diffusion-xl-base-1.0 run on your GPU?
Verdicts for common setups — from CPU-only laptops to an RTX 4090 and data-center GPUs. Click a GPU to see everything it can run.
| Your setup | Verdict | Needs | Best way to run |
|---|---|---|---|
| No GPU (16 GB RAM) | Workarounds | 8.2 GB | Use CPU offload or a cloud GPU |
| RTX 4060 (8 GB) | Workarounds | 8.2 GB | Use CPU offload or a cloud GPU |
| RTX 3060 (12 GB) | Runs | 8.2 GB | Run on your GPU with Diffusers / ComfyUI |
| RTX 4070 Super (12 GB) | Runs | 8.2 GB | Run on your GPU with Diffusers / ComfyUI |
| RTX 4080 Super (16 GB) | Runs | 8.2 GB | Run on your GPU with Diffusers / ComfyUI |
| RTX 4090 (24 GB) | Runs | 8.2 GB | Run on your GPU with Diffusers / ComfyUI |
| RTX 3090 (24 GB) | Runs | 8.2 GB | Run on your GPU with Diffusers / ComfyUI |
| Apple M-series (18 GB unified) | Runs | 8.2 GB | Run on your GPU with Diffusers / ComfyUI |
| Apple M Max (64 GB unified) | Runs | 8.2 GB | Run on your GPU with Diffusers / ComfyUI |
| A100 (80 GB) | Runs | 8.2 GB | Run on your GPU with Diffusers / ComfyUI |
How to run stable-diffusion-xl-base-1.0 locally
Recommended method: Run on your GPU with Diffusers / ComfyUI using ComfyUI or Diffusers.
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16)
pipe.enable_model_cpu_offload() # saves VRAM
out = pipe("a photo of an astronaut")# Easiest path for image/video diffusion models:
# 1. Install ComfyUI: https://github.com/comfyanonymous/ComfyUI
# 2. Place the weights for stabilityai/stable-diffusion-xl-base-1.0 in ComfyUI/models/
# 3. Load a workflow template for this modelstable-diffusion-xl-base-1.0 — frequently asked questions
How much memory does stable-diffusion-xl-base-1.0 need?
stable-diffusion-xl-base-1.0 needs roughly 8.2 GB of GPU or system memory to run, including runtime overhead. The exact amount depends on precision, context length, and framework.
Can I run stable-diffusion-xl-base-1.0 on CPU without a GPU?
Yes — stable-diffusion-xl-base-1.0 can run on CPU using system RAM (best with a quantized GGUF build via llama.cpp or Ollama), but generation will be noticeably slower than on a GPU.
What's the best way to run stable-diffusion-xl-base-1.0 locally?
The easiest path is usually ComfyUI or Diffusers. Run on your GPU with Diffusers / ComfyUI. This page's "How to run it" section has copy-paste commands.
What GPU do I need to run stable-diffusion-xl-base-1.0?
A GPU with at least 9 GB of VRAM runs stable-diffusion-xl-base-1.0 comfortably at 4-bit quantization. On Apple Silicon, unified memory of that size works too.