Advertisement

Install ComfyUI for AMD HIP/ROCm on Windows

A ComfyUI logo generated with AI for the Install ComfyUI with AMD HIP/ROCm on Windows guide.

Do you want to use your AMD GPU with ComfyUI to generate images and videos, but don’t know how to install it? You are in the right place! In this guide I will help you to Install ComfyUI with AMD HIP/ROCm support on Windows to accelerate your creativity.


Prerequisite: Installation of ROCm and PyTorch

Before installing ComfyUI you must install ROCm and PyTorch. I covered these topics on two articles:


Installation of ComfyUI enhanced by HIP/ROCm

The installation of ComfyUI for AMD HIP/ROCm is quite simple. Let’s start by opening a terminal, cloning the repository:

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

And enter the directory just created:

cd ComfyUI

If you followed my tutorials you will need to enter the python virtual environment where you had previously installed PyTorch:

conda activate py312

After that you must install the requirements with the command:

pip install -r requirements.txt

The installation is finished. To run the program use this command:

python main.py --use-pytorch-cross-attention

To update the program open a terminal in the directory that contain the program and run the following commands after entered the Conda environment:

Update the local repository:

git pull

And update the requirements:

pip install -r requirements.txt

For more information about using ComfyUI visit their main site.


Improve performance on AMD GPU

To improve performance you can try to run the command with an additional flag:

TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python main.py --use-pytorch-cross-attention

It can generate errors so ,if needed, remove the additional flag.



Leave a Reply

Your email address will not be published. Required fields are marked *