Install PyTorch and ComfyUI on ROCm 7.10.0

Install PyTorch and ComfyUI on ROCm 7.10.0#

This topic guides 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, showcasing AI-powered image generation.

AMD device family
Instinct GPU
Radeon PRO GPU
Radeon RX GPU
Ryzen AI APU
Operating system
Operating system

Prerequisites#

Ensure your system has a supported Python version installed and accessible: 3.11, 3.12, or 3.13.

Review the ROCm 7.10.0 compatibility matrix for more details.

Install PyTorch#

For prerequisite steps and post-installation recommendations, see the ROCm installation instructions.

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

    For example, run the following command to create a virtual environment:

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

  3. Install the appropriate ROCm-enabled PyTorch build for your operating system and AMD hardware architecture.

  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, for a demonstration of ROCm-powered image generation, try ComfyUI on Windows.

Install and run ComfyUI#

  1. Ensure your working environment is running ROCm-enabled PyTorch on a supported system. See Install PyTorch for instructions.

  2. Clone the ComfyUI repository.

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

  4. Run ComfyUI.

    1. Start the ComfyUI server from the command line.

      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-main.png
    3. Search for one of the following templates and download any missing models.

      Select TemplateModel FilterSD3.5SD3.5 Simple

      ../_images/sd3_5-simple-card.png

      Download required models, if missing.

      ../_images/sd3_5-missing-models.png

      Select TemplateModel FilterChromaChroma1 Radiance text to image

      ../_images/chroma1-radiance-tti-card.png

      Download required models, if missing.

      ../_images/chroma1-radiance-tti-missing-models.png
    4. Click the Run button.

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