Portrait of Michael Limberger

Michael Limberger

Need me? Email mike@limberger.ca

AI

Installation - Linux

Python 3.10, same as Mac

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

Ubuntu 20.04 or 22.04

Python 3.10 is already there. This is the easy path.

Show me.

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

Symbol map: apt is Ubuntu's package manager. python3-venv lets you make a sandbox. libgl1 and libglib2.0-0 are graphics libraries the UI expects. That finishes the Ubuntu 20.04 / 22.04 path.

Ubuntu 24.04 needs extra work

24.04 ships with Python 3.12, which does not play nice. Grab 3.10 from the deadsnakes PPA, a third-party package archive that still ships older Pythons.

Show me.

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 set it in webui-user.sh so you do not have to think about it:

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

python_cmd is the interpreter A1111 will call. --xformers is a memory-efficient attention library on NVIDIA. --autolaunch opens a browser when the UI is ready.

GPU paths

NVIDIA: get the proprietary drivers installed. Check with nvidia-smi. PyTorch brings its own CUDA runtime, so you do not need the full toolkit. Add --xformers for better performance.

AMD (ROCm): install ROCm drivers first. ROCm is AMD's GPU compute stack. Add --precision full --no-half. RX 7000 series also needs:

export HSA_OVERRIDE_GFX_VERSION=11.0.0

That override tells ROCm to treat the card as gfx 11.0.0, a version the stack already knows.

No GPU? CPU fallback works, but it will be slow enough that you will feel every step.

Show me.

export COMMANDLINE_ARGS="--use-cpu all --precision full --no-half --skip-torch-cuda-test"

When it breaks

Could not find a version that satisfies the requirement torch: wrong Python. Make sure you are 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