ComfyUI on ROCm installation#

2026-04-28

5 min read time

Applies to Linux

This topic covers setup and installation instructions to help you get started running ComfyUI.

System requirements#

To use ComfyUI 0.18.2, you need the following prerequisites:

Install ComfyUI#

To install ComfyUI on ROCm, you have the following options:

After setting up the container with either option, follow the common step to launch the ComfyUI server.

Use a prebuilt Docker image with ComfyUI pre-installed#

The prebuilt image contains a fully configured ComfyUI installation and all required dependencies pre-installed.

  1. Pull the Docker image.

    docker pull rocm/comfyui:comfyui-0.18.2.amd0_rocm7.2.0_ubuntu24.04
    
    docker pull rocm/comfyui:comfyui-0.18.2.amd0_rocm7.1.0_ubuntu22.04
    
  2. Start a Docker container using the image.

    docker run -it --privileged \
    --rm \
    --device=/dev/kfd \
    --device=/dev/dri \
    --group-add video \
    --cap-add=SYS_PTRACE \
    --security-opt seccomp=unconfined \
    --ipc=host \
    -p 8188:8188 \
    rocm/comfyui:comfyui-0.18.2.amd0_rocm7.2.0_ubuntu24.04
    
    docker run -it --privileged \
    --rm \
    --device=/dev/kfd \
    --device=/dev/dri \
    --group-add video \
    --cap-add=SYS_PTRACE \
    --security-opt seccomp=unconfined \
    --ipc=host \
    -p 8188:8188 \
    rocm/comfyui:comfyui-0.18.2.amd0_rocm7.1.0_ubuntu22.04
    

Build from source#

ComfyUI on ROCm can be run directly by setting up a Docker container from scratch. A Dockerfile is provided in the ROCm/ComfyUI repository to help you get started.

  1. Clone the ROCm/ComfyUI repository.

    git clone https://github.com/rocm/ComfyUI.git -b amd-integration
    cd ComfyUI
    
  2. Build the Docker image.

    docker build --file docker/Dockerfile.rocm --tag comfyui-rocm .
    

    This will pull the rocm/pytorch-training:v25.2 image and install ComfyUI, the ComfyUI Node Manager, the rgthree/rgthree-comfy custom nodes, and the required dependencies.

  3. Launch a container based on the image.

    docker run -it --privileged \
    --rm \
    --device=/dev/kfd \
    --device=/dev/dri \
    --group-add video \
    --cap-add=SYS_PTRACE \
    --security-opt seccomp=unconfined \
    --ipc=host \
    -p 8188:8188 \
    comfyui-rocm
    

Run ComfyUI#

To run ComfyUI, you can choose to launch the server remotely or from the command line.

Launch the remote ComfyUI server#

After starting a Docker container with either option above, you can launch the ComfyUI server:

python $COMFYUI_PATH/main.py --port 8188 --listen

This starts the server on the default port 8188. The port can be changed by setting the environment variable COMFYUI_PORT_HOST or by using the --port flag.

Server options:

  • --listen: Allow connections from any network interface (needed for remote or container access).

  • --port <PORT>: Change the default port (default: 8188). Can also be set via the COMFYUI_PORT_HOST environment variable.

  • --gpu-only: Force all operations to run on the GPU.

Launch ComfyUI from the command line#

  1. Start the ComfyUI server from the command line.

    python ComfyUI/main.py
    

    This starts the server and displays 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.

    Example output with host name and port number
  3. Search for one of the following templates and download any missing models. See Download and use models in ComfyUI.

    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 Run.

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

Test the ComfyUI installation#

To verify that ComfyUI was installed correctly, test ROCm PyTorch support. Inside the running container, confirm that PyTorch detects the GPU:

python3 -c "import torch; print(torch.cuda.is_available()); print(torch.cuda.get_device_name(0))"

The expected output is True followed by your AMD GPU device name, for example:

True
AMD Instinct MI355X

If you see the version string above, ComfyUI 0.18.2 has been installed successfully. You can now use ComfyUI in your projects.

Next Steps#

Now that you have ComfyUI running on your AMD Instinct GPU, you can:

  • Explore additional workflow templates

  • Create custom workflows from scratch

  • Install community-created custom nodes

  • Experiment with different models and parameters

  • Build your own custom nodes for specialized tasks