-
Notifications
You must be signed in to change notification settings - Fork 6k
Better Cross Attention Support For Graphcore IPUs #1830
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
Comments
Sorry just to better understand, Graphcore worked with diffusers before we've merged: #1639 And now it doesn't work anymore? |
I guess we should ping gradient-ai to update their code to the new format soon? |
Their Stable Diffusion demo still works with the diffusers pipeline, but only with this override that was apparently posted 3 weeks ago, before that merge you mentioned: https://github.com/gradient-ai/Graphcore-HuggingFace/blob/main/stable-diffusion/ipu_models.py#L35-L93 If I comment out either of these 2 lines so the demo uses the regular diffusers cross attention code: I get this error: Cross Attention Error
And I was told this override makes integration with InvokeAI difficult. |
Uff sorry, I'm really not an expert on Graphcore IPUs |
The better option might be to wait for graphcore to finish adding support for all its missing operations, assuming they do add them. Poptorch is still rather new and unstable, so support for it is likely difficult. |
One thing I realized a few days ago is that my testing environment (A Paperspace Gradient POD4 notebook) is pretty old. Its running Ubuntu 20.04, Python 3.8, and what I suspect is an old build of poptorch... and I cant build or update poptorch without some kind of Graphcore login to download the SDK.
|
It's not in 3.0. I tested with poptorch 3.0 and it does not support baddbmm. Paperspace is on 2.6. You might have to contact graphcore instead. |
There are some commits made specifically for https://github.com/graphcore/poptorch/search?q=baddbmm&type=commits @Lime-Cakes Did you manage to update poptorch to 3.0 in a Gradient notebook, or were you testing in some other environment? I want to give 3.1 a shot (as I want to raise an issue on the poptorch repo if necessary), but I have no clue how to update it without a login. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Hello. In Graphcore's Stable Diffusion demo, it seems they replace your cross attention implementation with their own, to work around some issues:
https://github.com/gradient-ai/Graphcore-HuggingFace/blob/main/stable-diffusion/ipu_models.py#L35-L93
I modified their demo to pull the latest diffusers release and skip the override, and it seems that the issue is still present, as I elaborated on here:
invoke-ai/InvokeAI#2120 (comment)
I was told (in the above issue) that their cross attention override makes Graphcore IPU compatibility in InvokeAI messy, that your cross attention API isn't released yet, and that this may be useful feedback?
I'm a humble end user in way over my head, so let me know if I am way off base here :P
The text was updated successfully, but these errors were encountered: