santa hat
deerdeer nosedeer glow
Sign In

Running Automatic1111 on Ubuntu for AMD gpus



This guide focus on installing Auto1111 for AMD users with maximum performance in mind.

Sadly, no decent solution in term of speed and VRAM usage is currently available on Windows, Linux is needed for a decent experience.


This guide was tested on my personal desktop computer equipped with a RX6800XT and 32Go of ram. All images posted on my Civitai account (mostly nsfw) were generated using this solution and gpu.

Speed Results:

About 7.20it/s for 512x512

Disclaimer: Minimal knowledge of Linux is mandatory, I don't recommend using this if you never installed a Linux distribution before.

Install Ubuntu 22.04.02 LTS from a USB Key

  • Perform a standard dual boot install. (no third party proprietary repositories)

Update Ubuntu

sudo apt-get update
sudo apt-get dist-upgrade


Install AMD drivers and ROCm

Needed Prerequisites for ROCm:

sudo apt-get install gnupg2 gawk curl git
sudo usermod -a -G render $LOGNAME
sudo usermod -a -G video $LOGNAME

Install AMD drivers:

Download amdgpu-install_5.6.50600-1_all.deb and install it:

sudo apt update
sudo apt install ./amdgpu-install_5.6.50600-1_all.deb

Install ROCm:

sudo amdgpu-install --rocmrelease=5.6.0 --usecase=rocm,rocmdev,rocmdevtools,lrt,hip,hiplibsdk,mllib,mlsdk --vulkan=pro --no-32 --accept-eula


Check your ROCm info, your AMD gpu should be listed:


Install Auto1111

sudo apt-get install git
sudo apt install python3.10-venv
sudo apt-get install libstdc++-12-dev

Edit the ~/.bashrc file:

Add alias python=python3 at the end of your .bashrc file, save and close.

source ~/.bashrc
cd ~
git clone
cd stable-diffusion-webui
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip wheel
pip3 install --pre torch torchvision torchaudio --index-url

At the time beeing, pytorch for ROCm5.6 is not available, but the 5.5 version should be ok.

Running Auto1111

cd stable-diffusion-webui
source venv/bin/activate
python --precision full --no-half --medvram

Running on low VRAM

cd stable-diffusion-webui
source venv/bin/activate
PYTORCH_HIP_ALLOC_CONF=garbage_collection_threshold:0.9,max_split_size_mb:512 python --precision full --no-half

Running on RDNA2 & RDNA3 Series

cd stable-diffusion-webui
source venv/bin/activate

--precision full & --no-half are not needed on RDNA2 or RDNA3, and will save a lot of VRAM.
If you don't generate big images, you can also skip the -medvram.

Please note, first time generating an image could take some time as a cache is built.