ComfyUI Extension: MIGraphX Node for ComfyUI
This node enables better performance for Stable Diffusion models, by leveraging AMD MIGraphX, on Navi3 and Navi4 GPUs.
Custom Nodes (0)
README
MIGraphX Node for ComfyUI
This node enables better performance for Stable Diffusion models, by leveraging AMD MIGraphX, on Navi3 and Navi4 GPUs.
Supports:
- Stable Diffusion 3.0 medium (huggingface model)
- Stable Diffusion 3.5 medium (huggingface model)
- Other models to be supported...
Installing
Dependencies
To run node with MIGraphX support install:
- ROCm
- PyTorch with ROCm support
- MIGraphX:
sudo apt install migraphx
Install node
To run this node you need to install ComfyUI. To manually install clone this repo to ComfyUI/custom_nodes folder:
cd ComfyUI/custom_nodes
git clone https://github.com/pnikolic-amd/ComfyUI_MIGraphX.git
cd ComfyUI_MIGraphX
pip install -r requirements.txt
#for best performance
export MIGRAPHX_MLIR_USE_SPECIFIC_OPS="attention"
Instructions
You can find different workflows in the workflows directory. They can be loaded in ComfyUI.
Create workflow with MIGraphX support
To add MIGraphX node go to toolbar/node library/advanced/migraphx and select "Compile diffusion model on migraphx" node. Connect input model to "Load Checkpoint" node and connect output model to "KSampler" or some other node. Params:
- batch_size, height, width - set same as in Latent image node (testd with 512x512 and 1024x1024).
- context_len - 77 if t5 is not used, 154 if t5 is used.
- data_type - data type that models uses (fp16 for model in example).