ComfyUI in chroot
Some specifics here will relate to RDNA4 (RX 9070 TX) which is gfx1201.
Adjust for the correct graphics card in the system you are using.
Installing PyTorch Stuff (bleeding edge)
Make a virtual environment, however you might like to do that, I did this:
python3 -m venv venv313
pip install --index-url https://stable.repo.amd.com/rocm/whl-next/ "torch[device-all]==2.13.0+rocm10.0.0" "torchvision[device-all]==0.28.0+rocm10.0.0" "torchaudio==2.11.0.2+rocm10.0.0"
device-all may be replaced with device-gfx1201 or device-gfx1151 etc.
See ComfyUI help / install for more detail.
Then check that the installation worked:
import torch; x = torch.rand(5, 3); print(x)
-- should show some numbers here --
torch.cuda.is_available()
True
The above was taken from the pytorch "Getting Started" page.
Installing more stable PyTorch
It is possible to simply run the command from the PyTorch getting started page:
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/rocm7.14
That will download a whole heap of stuff you probably don't need. If you
know your GPU (you can find out which you have with rocminfo):
*******
Agent 2
*******
Name: gfx1201
Uuid: GPU-XX
This page will help composing the correct installation command:
And then alter the line below accordingly:
python3 -m pip install \
--index-url https://repo.amd.com/rocm/whl-multi-arch/ \
"torch[device-gfx1201]==2.12.0+rocm7.14.0" \
"torchvision[device-gfx1201]==0.27.0+rocm7.14.0"
IMPORTANT: be careful of version numbers (maybe they can be omitted?)!
Installing ComfyUI
Clone repository:
git clone --depth=1 https://github.com/Comfy-Org/ComfyUI.git
Be sure you are in the venv you created above then get the requirements for ComfyUI and ComfyUI Manager:
pip install -r requirements.txt
pip install -r manager_requirements.txt
That is it! Run!
python3 main.py --enable-manager
Note for ROCm:
The system currently breaks when executed on a RX 9070 XT, there are reports that this is a known problem but this is how I resolved the problem:
Kernel: 6.18.55-1-lts
ROCm: 7.2.4
cat /opt/rocm/.info/version
PyTorch: 2.14.1+rocm7.14
python3 -c "import torch; print(torch.__version__)"
Torch Version hip: torch.version.hip
python3 -c "import torch; print(torch.version.hip)"
