Install ComfyUI

Install ComfyUI#

Install ComfyUI on AMD GPUs.

Prerequisites#

  • ROCm is installed.

Installation#

Follow these steps to install ComfyUI.

  1. Install the Python venv package for the applicable Python version.

    sudo apt install python3.12-venv
    
  2. Create a Python virtual environment.

    python3 -m venv comfyui-venv
    source comfyui-venv/bin/activate
    
  3. Install the latest PyTorch ROCm wheels in the environment created.

    Note
    Refer to Install Pytorch for Ryzen APUs for more comprehensive install instructions. Proceed to install within the environment if the wheels are already downloaded to the system. Example command:

    pip3 install <torch wheel> <torchaudio wheel> <torchvision wheel> <triton wheel>
    
  4. Clone the ComfyUI repository.

    git clone https://github.com/comfyanonymous/ComfyUI.git && cd ComfyUI
    

    Note

    See ComfyUI Github for more information.

  5. Install ComfyUI requirements.

    pip install -r requirements.txt
    
  6. Launch ComfyUI.

    Note
    Users must return to the home directory of the repository in order to run main.py.

    python3 main.py
    

    Click to URL to open ComfyUI in a browser.

    Note
    After running the above command, ensure that the Pytorch version seen in the terminal is the ROCm 7.1.1 specific one.

  7. From the ComfyUI frontend, click on Templates → Search for ‘SDXL Turbo’ → Follow prompt for model install and place it into the ‘checkpoints’ folder under ComfyUI>models>checkpoints.

    PyTorch template

  8. From the ComfyUI frontend, click ‘Run’ to begin image generation. PyTorch template