How to install Stable Diffusion locally?

By Updated 3 min read

To run Stable Diffusion on your own computer you need a GPU with at least 6 GB of VRAM, Python 3.10, Git, the Automatic1111 web UI and a model file. Installation takes about twenty minutes and 15 GB of disk; after that, generation is free, offline and private.

Requirements

ComponentMinimumComfortable
GPUNVIDIA 6 GB VRAM (SD 1.5)NVIDIA 8–12 GB (SDXL), 16 GB (SD 3.5 Large)
AMD / AppleROCm on Linux, Apple Silicon 16 GB RAMslower but works; DirectML on Windows is slow
RAM16 GB32 GB
Disk15 GB (app + one model)50 GB+ for several models
OSWindows 10/11, Ubuntu 22.04+, macOS 13+

No compatible GPU? The tools on this site (inpainting, upscaling, SDXL) run on our hardware, no installation.

Step by step (Windows, Automatic1111)

  1. Install Python 3.10.6 and tick Add Python to PATH. Newer Python versions break some dependencies.
  2. Install Git with default options.
  3. Open a terminal in the folder of your choice and run git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.
  4. Download a model: SDXL 1.0 base (6.9 GB) and optionally the refiner, or Stable Diffusion 1.5 (4.3 GB). Take the .safetensors file.
  5. Put the model in stable-diffusion-webui/models/Stable-diffusion/.
  6. Double-click webui-user.bat. The first start downloads about 5 GB of dependencies and takes 5 to 15 minutes.
  7. Open http://127.0.0.1:7860 in your browser, pick the model at the top left, type a prompt, click Generate.

On Linux and macOS, run ./webui.sh instead of the .bat file; the script creates its own Python environment.

Useful launch options

Edit webui-user.bat and set COMMANDLINE_ARGS:

  • --xformers: faster and lighter on NVIDIA.
  • --medvram or --lowvram: for 4 to 6 GB cards, at the cost of speed.
  • --listen: reach the interface from another device on your network.
  • --api: enables the REST API used by scripts (this site talks to its own Automatic1111 that way).

Common errors

  • CUDA out of memory: lower the image size, add --medvram, close other GPU programs.
  • Torch not compiled with CUDA: an unsupported Python version or a CPU-only PyTorch; reinstall with Python 3.10 and delete the venv folder.
  • No model found: the file is not in models/Stable-diffusion or has the wrong extension.
  • Black images on AMD or Apple: add --no-half or --upcast-sampling.

Alternatives to Automatic1111

Forge is a faster fork with the same interface. ComfyUI uses a node graph, ideal for SD 3.5 and Flux and for complex pipelines. Fooocus hides all settings and gives Midjourney-like results with one prompt. All three read the same model and LoRA files.

Questions people also ask

Can I install Stable Diffusion without a graphics card?

It runs on CPU but takes several minutes per image; not usable in practice. Use a cloud GPU or the free tools on this site instead.

How much disk space does it take?

About 10 GB for the web UI and its dependencies, plus 2 to 7 GB per model and up to 150 MB per LoRA. Plan 50 GB if you collect models.

Is it legal and free to install?

Yes. The web UI is open source (AGPL) and the models are downloadable under their licences, free for personal and most commercial uses.