[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ComfyUI with Stable Diffusion on AMD GPUs



On 2024-12-20 02:35, Cordell Bloor wrote:

Hi folks,

I was browsing Reddit when I came across a comment by ricperry1 that explained how to use ComfyUI on Ubuntu 24.04 using the system-provided ROCm packages [1]. The original motivation seems to have been to use StableDiffision on his AMD GPU in the window of time between the release of Ubuntu 24.04 and the release of ROCm 6.2 (which is when AMD began providing packages for Ubuntu 24.04).

8<

sudo apt-get -y install git wget python3 python3-venv python3-pip synaptic \ hipcc libhiprtc-builtins5 librccl1 librocalution0 librocblas0 librocfft0 \
librocsolver0 librocsparse0 rocm-smi rocminfo libhiprand1 radeontop
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
git checkout 3cacd3fca54dc8928ae27dcff6c89f1d40c34038
python3 -m venv venv3
source venv3/bin/activate
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2

Hi,

Thanks for sharing this recipe here. While this works fine with gfx1100/rx7900xt as well, it actually uses the rocm libraries included in the pytorch wheel file, rather than the installed rocm system libraries unfortunately:

bart@melaina:~$ lsof | grep libroc
python3 5027 bart mem REG 0,32 1532003185 19679 /usr/src/stable-diff/ComfyUI/venv3/lib/python3.12/site-packages/torch/lib/librocsparse.so python3 5027 bart mem REG 0,32 168144889 19677 /usr/src/stable-diff/ComfyUI/venv3/lib/python3.12/site-packages/torch/lib/librocrand.so python3 5027 bart mem REG 0,32 70616089 19675 /usr/src/stable-diff/ComfyUI/venv3/lib/python3.12/site-packages/torch/lib/librocfft.so
[...]

Bart


Reply to: