Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amd acceleration in linux #76

Open
leiserfg opened this issue Nov 20, 2023 · 4 comments
Open

Amd acceleration in linux #76

leiserfg opened this issue Nov 20, 2023 · 4 comments

Comments

@leiserfg
Copy link

ComfyUI in linux can use rocm, why is it labeled as "windows only" here?

@Acly
Copy link
Owner

Acly commented Nov 20, 2023

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.

Acly added a commit that referenced this issue Nov 21, 2023
…ent step to avoid confusion about greyed out docker)
@drjarno
Copy link

drjarno commented Nov 21, 2023

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.

@x0r13
Copy link

x0r13 commented Nov 23, 2023

@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.

@palko444
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants