Run Stable Diffusion on RX 9060 XT (ROCm)
Complete guide to running SDXL and FLUX on the AMD RX 9060 XT 16 GB using ROCm and ComfyUI on Linux.
Generation Time
6–9s per 1024×1024 (SDXL)
Min Memory
8 GB
Software
ROCm 6.3+, Ubuntu 22.04, Python 3.11, ComfyUI
Hardware Used in This Guide
gpu · Check Price on Amazon
Step-by-Step Setup
- 01
Install ROCm 6.3
ROCm 6.3+ is required for RDNA 4 (RX 9060 XT) support. The AMDGPU-install script handles kernel modules and libraries.
wget https://repo.radeon.com/amdgpu-install/6.3/ubuntu/jammy/amdgpu-install_6.3.60300-1_all.deb sudo dpkg -i amdgpu-install_6.3.60300-1_all.deb sudo amdgpu-install --usecase=rocm # Verify rocm-smi
- 02
Install PyTorch with ROCm support
Use the ROCm-specific PyTorch wheel — the standard PyPI build does not include ROCm.
pip install torch torchvision torchaudio \ --index-url https://download.pytorch.org/whl/rocm6.3
- 03
Install ComfyUI
Clone ComfyUI and install requirements. The ROCm PyTorch you installed will be detected automatically.
git clone https://github.com/comfyanonymous/ComfyUI cd ComfyUI && pip install -r requirements.txt
- 04
Set HSA override for RDNA 4
RDNA 4 may need a GPU target override until ROCm fully formalizes RDNA 4 support.
export HSA_OVERRIDE_GFX_VERSION=11.0.0 python main.py --gpu-only
- 05
Download and run SDXL
16 GB VRAM fits SDXL + refiner in a single pass. Expect 6–9s per 1024×1024 image.
cd models/checkpoints wget https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors
Optimization Tips
- ›
ROCm performance on RDNA 4 improves with each release — update ROCm before troubleshooting slow generation.
- ›
16 GB VRAM means you can run FLUX.1 Dev at full fp16 precision, unlike 8–12 GB cards that need fp8.
- ›
The HSA_OVERRIDE_GFX_VERSION workaround may not be needed once ROCm 6.4 ships with native RDNA 4 support.
- ›
ollama also supports ROCm on Linux — for LLM use, install with the same ROCm stack.
Related Guides
Run SDXL and FLUX on RTX 5070→
How to run SDXL and FLUX.1 on the NVIDIA RTX 5070 with 12 GB GDDR7 — setup, benchmarks, and VRAM optimization tips.
Run Ollama on a Mini PC (Intel/AMD)→
How to run local LLMs with Ollama on an Intel or AMD mini PC — best models for 16 GB RAM, performance expectations, and optimization.