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

ROCm support #25

Open
renich opened this issue Oct 31, 2024 · 5 comments
Open

ROCm support #25

renich opened this issue Oct 31, 2024 · 5 comments

Comments

@renich
Copy link

renich commented Oct 31, 2024

Would it be possible for you to implement ROCm support?

@xhinker
Copy link
Owner

xhinker commented Jan 9, 2025

Sorry for my late response, I don't use the ROCm and AMD card, so I don't think ROCm will be supported in the foreseeable future, but welcome merging your code if you want to contribute to this tool. Thank You

@renich
Copy link
Author

renich commented Jan 14, 2025

No worries. I don't think my python chops are up to par with what is required. I can give it a shot, though. Yet, hopefully, someone else can hop in and help us.

@Teriks
Copy link
Contributor

Teriks commented Jan 14, 2025

I do not think there is currently anything in the code preventing ROCm support, if you have an environment setup where diffusers is running on ROCm, this code should be able to run in that environment.

ROCm uses the same device names as the CUDA backend for compatibility, the difficult part of ROCm is getting a correct environment to run the code

I have had some success setting this up on runpod.io on an AMD card, here are some steps I took to create the environment: https://github.com/Teriks/dgenerate?tab=readme-ov-file#linux-with-rocm-amd-cards

mostly just that, minus installing my project

@renich
Copy link
Author

renich commented Jan 14, 2025

I think this is the main reason I opened up this bug:

https://github.com/xhinker/sd_embed?tab=readme-ov-file#install

torchao has a PR that seems to be introducing ROCm support: pytorch/ao#1201

@Teriks
Copy link
Contributor

Teriks commented Jan 15, 2025

I think this is the main reason I opened up this bug:

https://github.com/xhinker/sd_embed?tab=readme-ov-file#install

torchao has a PR that seems to be introducing ROCm support: pytorch/ao#1201

Ah yea, torchao is used for quantization in the examples. It seems a lot of quant libraries are still WIP on ROCm support.

The actual prompt weighting code does not involve torchao and runs fine I believe, fyi @xhinker

You just have skip out on using quantization features for ROCm, I could not get bitsandbytes working on ROCm with their multiplatform wheel for instance. The support for it is just spotty at the moment.

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

3 participants