Open leiserfg opened 9 months ago
The automated installer only supports DirectML. That's because I don't have an AMD GPU to test RocM (but I can test DirectML with Nvidia). If you're installing and setting up ComfyUI yourself you can make it work.
I can update the readme to reflect that a bit more precisely.
You should be able to convert the automatically installed environment to one that supports ROCm by doing the following:
source .local/share/krita/pykrita/ai_diffusion/.server/venv
pip install --force-reinstall torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6
For some reason, I had to follow up that command with:
pip install "fsspec>=2023.5.0"
I guess --force-reinstall
does something funny with the dependencies.
Anyway, after that I could run the plugin from Krita using my GPU. My AMD GPU is a wimpy Radeon RX 5700 XT though so using CPU was actually faster. I also had to set HSA_OVERRIDE_GFX_VERSION=10.3.0
, but that's GPU specific.
@drjarno I can confim it works that way (you have to start the server yourself), and then connect via the plugin. Using a RX6800 it takes around 2-3mins for a 512x512 image.
@x0r13 can you please tell me how to start server yourself. I was using button in krita UI. I reinstalled packages as stated by @drjarno in venv, but it did not helped. I still can see only 2 options CPU or GPU (cuda). My card is same as @drjarno Radeon RX 5700 XT. Thank you in advance
hello! I have an AMD GPU and would love to work on this. It'd be my first issue, so lmk if there's anywhere specific I should look to get started.
You mean adding a RocM option for the installer?
Basically you
ServerBackend.rocm
option here (make it linux only)Ideally you can then select RocM from the installer UI and it works. Not sure if you need to pass extra arguments to ComfyUI, it can be done in server.py/start. The annoying part is testing and making sure it really works since install takes a while. See the notes in contributing to speed it up if you have to do it repeatedly.
ComfyUI in linux can use rocm, why is it labeled as "windows only" here?