Skip to content

Repository files navigation

MIGraphX Node for ComfyUI

This node enables better performance for Stable Diffusion models, by leveraging AMD MIGraphX, on Navi3 and Navi4 GPUs.

Supports:

Installing

Dependencies

To run node with MIGraphX support install:

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
export PYTHONPATH=/opt/rocm/lib:$PYTHONPATH
#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).

ComfyUI Screenshot

About

No description, website, or topics provided.

Resources

Stars

19 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages