Install PyTorch and ComfyUI on ROCm 7.9.0

Install PyTorch and ComfyUI on ROCm 7.9.0#

2025-10-20

3 min read time

Applies to Linux and Windows

This guide walks you through installing PyTorch with ROCm support on AMD hardware. It applies to supported AMD GPUs and platforms. It also includes additional setup steps for ComfyUI on Windows using Ryzen AI (gfx1151) APUs, showcasing AI-powered image generation.

Prerequisites#

Before beginning, ensure your system meets these requirements:

  • Python version: 3.11, 3.12, or 3.13 installed and accessible

  • ROCm 7.9.0: A working ROCm installation (if not already installed via pip, this guide covers the setup)

Review the ROCm 7.9.0 compatibility information.

Install PyTorch#

For prerequisite steps and post-installation recommendations, see Install AMD ROCm 7.9.0.

  1. Set up your Python virtual environment. If you already have a successful ROCm 7.9.0 installation via pip, skip this step.

    python3.12 -m venv .venv
    
  2. Activate your Python virtual environment.

    source .venv/bin/activate
    
    .venv\Scripts\activate
    
  3. Install the appropriate ROCm-enabled PyTorch build for your operating system and AMD hardware architecture.

    python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx950-dcgpu/ torch torchvision torchaudio
    
    python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx94X-dcgpu/ torch torchvision torchaudio
    
    python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ torch torchvision torchaudio
    
    python -m pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ torch torchvision torchaudio
    
  4. Check your PyTorch installation.

    python -c "import torch; print(torch.cuda.is_available())"
    

    This prints True if PyTorch and ROCm are installed properly.

Optionally, if you’re running Windows on a supported Ryzen AI APU, try ComfyUI on Windows.

Install ComfyUI on Windows#

ComfyUI is tested for support only on Ryzen AI (gfx1151) APUs on Windows.

  1. Ensure your working environment is running ROCm-enabled PyTorch 2.9.0 on Windows. See Install PyTorch.

  2. Clone the ComfyUI repository.

    git clone https://github.com/comfyanonymous/ComfyUI.git
    
  3. Install Python dependencies.

    pip install -r ComfyUI\requirements.txt
    
  4. Run ComfyUI.

    1. Start the ComfyUI server from the command line.

      python ComfyUI\main.py
      

      This will start the server and display a prompt like:

      To see the GUI go to: http://127.0.0.1:8188
      
    2. Navigate to http://127.0.0.1:8188 in your web browser. You might need to replace 8188 with the appropriate port number.

      ../_images/comfyui.png
    3. Search for the “Chroma1 Radiance text to image” template.

      • Select TemplateImagesChroma1_radiance.

      • Download any missing required models.

      ../_images/comfyui-missing-models.png
    4. Click the Run button.

    The application will use your AMD GPU to convert the prompted text to an image.

Known limitations#

ComfyUI might not start if Smart App Control is enabled.