canirunthismodel

Can I run stable-diffusion-xl-base-1.0 locally?

stabilityai/stable-diffusion-xl-base-1.0
Text-to-image (diffusion)2.6B params72 GB download

stable-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 machine

stable-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.

PrecisionMemory neededNotes
Image pipeline8.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 setupVerdictNeedsBest way to run
No GPU (16 GB RAM)Workarounds8.2 GBUse CPU offload or a cloud GPU
RTX 4060 (8 GB)Workarounds8.2 GBUse CPU offload or a cloud GPU
RTX 3060 (12 GB)Runs8.2 GBRun on your GPU with Diffusers / ComfyUI
RTX 4070 Super (12 GB)Runs8.2 GBRun on your GPU with Diffusers / ComfyUI
RTX 4080 Super (16 GB)Runs8.2 GBRun on your GPU with Diffusers / ComfyUI
RTX 4090 (24 GB)Runs8.2 GBRun on your GPU with Diffusers / ComfyUI
RTX 3090 (24 GB)Runs8.2 GBRun on your GPU with Diffusers / ComfyUI
Apple M-series (18 GB unified)Runs8.2 GBRun on your GPU with Diffusers / ComfyUI
Apple M Max (64 GB unified)Runs8.2 GBRun on your GPU with Diffusers / ComfyUI
A100 (80 GB)Runs8.2 GBRun 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.

Python (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")
Or use ComfyUI
# 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 model

stable-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.

Related models

Check this model on a specific GPU