Image Generation3.5B

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

GIGABYTE Radeon RX 9060 XT GAMING OC 16G

gpu · Check Price on Amazon

Buy on AmazonAffiliate link — no extra cost to you

Step-by-Step Setup

  1. 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
  2. 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
  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
  4. 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
  5. 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