-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Scheduling fixes on MPS #10549
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
Scheduling fixes on MPS #10549
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
maybe it is easier to only use np32 for MPs? Some of the models we recently integrated are very sensitive to precision (e.g. MOCHI, LTX) cc @bghira here for this opinions too |
|
Sana is especially sensitive but it could be like the RoPE for Flux where we went from fp64 to fp32 and saw no real degradation. if it won't work on MPS maybe some CPU fallback code can work for those systems, but that sounds like an upstream pytorch limitation. i guess i'd give it a whirl and see if the known sensitive models have an issue, and document potential instabilities with Pytorch on MPS (which is in general a good idea to hamper expectations) |
|
Given the timesteps range casting diffusers/tests/schedulers/test_schedulers.py Line 725 in 28c1f3b
There are some issues on PyTorch regarding
|
|
|
yiyixuxu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
What does this PR do?
segfaultin MPS scheduler tests is caused byrandn_like, there are a few related PyTorch issues about problems with*_likefunctions on MPS.float64is unsupported on MPS,timestepsarefloat64inscheduling_heun_discreteandscheduling_lms_discrete, this change should be ok as thetimestepis downcast later anyway.In
test_schedulersusing.to(sample.device, dtype=sample.dtype)instead of.to(sample.device).to(sample.dtype)should be the same but compatible with MPS.Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.