ComfyUI image generation on ROCm

ComfyUI image generation on ROCm#

ComfyUI is an open-source, node-based interface for building and running image generation workflows with diffusion models such as Stable Diffusion. Its modular graph-based design lets you construct, customize, and share complex pipelines without writing code. This page walks through installing and running ComfyUI on AMD GPUs.

Prerequisites#

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

Important

On Windows, ComfyUI might not start if Smart App Control is enabled in your Windows security settings.

Installation#

After installing ROCm and PyTorch in your Python environment, follow these steps to install ComfyUI.

  1. Clone the ComfyUI repository.

    git clone https://github.com/comfyanonymous/ComfyUI.git
    
  2. Activate your Python virtual environment and install dependencies.

    pip install -r ComfyUI/requirements.txt
    
    pip install -r ComfyUI\requirements.txt
    

Run ComfyUI#

Use the following steps for a simple example of running ComfyUI.

  1. Start the ComfyUI server from the command line.

    python ComfyUI/main.py
    
    python ComfyUI\main.py
    

    This starts the server, displaying a prompt like:

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

    ../_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.

See also

To learn more about the ComfyUI interface and workflows, see the ComfyUI documentation.