Techalicious Academy / 2025-12-11-stable-diffusion

(Visit our meetup for more great tutorials)

INSTALLATION - LINUX

The Big Rule: Python 3.10

You need Python 3.10. Newer versions (3.11, 3.12) break dependencies.

Ubuntu 20.04 or 22.04 (Easy Mode)

Python 3.10 is already there. Just do this:

sudo apt install wget git python3 python3-venv libgl1 libglib2.0-0

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

Done.

Ubuntu 24.04 (Needs Extra Work)

24.04 ships with Python 3.12, which doesn't play nice. Grab 3.10 from the deadsnakes PPA:

sudo apt install git software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt install python3.10 python3.10-venv libgl1 libglib2.0-0 -y

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

# Force it to use 3.10
python3.10 -m venv venv

./webui.sh

Or just set it in webui-user.sh so you don't have to think about it:

#!/bin/bash
python_cmd="python3.10"
export COMMANDLINE_ARGS="--xformers --autolaunch"

GPU Stuff

NVIDIA:

Get the proprietary drivers installed. Check with nvidia-smi.
PyTorch brings its own CUDA runtime so you don't need the toolkit.
Add --xformers for better performance.

AMD (ROCm):

Install ROCm drivers first.
Add these flags: --precision full --no-half
RX 7000 series also needs: export HSA_OVERRIDE_GFX_VERSION=11.0.0

No GPU? CPU fallback:

export COMMANDLINE_ARGS="--use-cpu all --precision full --no-half --skip-torch-cuda-test"
(It'll be slow, but it works)

When Things Go Wrong

"Could not find a version that satisfies the requirement torch":

Wrong Python version. Make sure you're actually using 3.10.

"CUDA out of memory":

Add --medvram or --lowvram, turn on --xformers, drop the resolution

Black or green images:

Add --no-half-vae or go full precision with --precision full --no-half

OpenGL library errors:

sudo apt install libgl1 libglib2.0-0