Install ComfyUI and MIGraphX extension#
Install ComfyUI and the MIGraphX extension on AMD GPUs.
Prerequisites#
ROCm is installed.
Installation#
Follow these steps to install ComfyUI.
Install the Python
venvpackage for the applicable Python version.sudo apt install python3.12-venv
sudo apt install python3.10-venv
Create a Python virtual environment.
python3 -m venv comfyui-venv source comfyui-venv/bin/activate
Install the latest PyTorch ROCm wheels in the environment created.
Note
Refer to Install Pytorch for Radeon GPUs 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>
Clone the ComfyUI repository.
git clone https://github.com/comfyanonymous/ComfyUI.git && cd ComfyUI
Note
See ComfyUI Github for more information.
Install ComfyUI requirements.
pip install -r requirements.txt
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.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.

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

Installing the MIGraphX node for ComfyUI#
The MIGraphX Node for ComfyUI offers accelerated inference on Stable Diffusion 3 models.
Note
Refer to ComfyUI MIGraphX Github for more information.
Install the MIGraphX node.
cd ComfyUI/custom_nodes git clone https://github.com/pnikolic-amd/ComfyUI_MIGraphX.git cd ComfyUI_MIGraphX pip install -r requirements.txt
Launch ComfyUI.
Note
The ROCm path to Python must be exported to prevent a module missing error for MIGraphX.
export PYTHONPATH=/opt/rocm-X.X.X/lib:$PYTHONPATH
Replace the ROCm version with your applicable version. For example,
/opt/rocm-6.4.1/lib.cd ComfyUI # For the best performance, run the following environment variable: export MIGRAPHX_MLIR_USE_SPECIFIC_OPS="attention" python3 main.py
Using the MIGraphX node for ComfyUI#
The MIGraphX Node for ComfyUI includes ready-to-use templates, each preconfigured with optimized settings for the supported Stable Diffusion models.
To access them, go to: Workflow > Browse Templates > ComfyUI_MIGraphX
Each template is optimized for a specific Stable Diffusion model. Be sure to load the corresponding model before using the template.