-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
RuntimeError: User specified an unsupported autocast device_type 'mps' #29431
Comments
I've submitted a PR to address this issue. It seems that reverting to a version of the library prior to 4.38.2 might work well as a temporary workaround. However, I haven't tried this. |
I spent all weekend trying to get google/gemma-2b-it to work with mps. Finally, what worked was reverting to transformers 4.38.1 Thanks @currybab |
Hi everyone, Maybe someone from the hugging face team could share if this an error that they will fix on the future releases of transformers. Thanks |
Hi @mmenendezg - this should have been resolved in #29439. Do you still experience the error if you install transformers from source? |
Hi @amyeroberts - Yes, this fixes the issue. Thanks for your support. |
Hi, unfortunately i am getting this error as well on an M2 max macbook pro, 64gb.
i am pretty new to the python world, so forgive me, if i ask something stupid. I have a conda environment, in which i installed all of the packages with pip and conda. In the stable-diffusion folder, there is a venv folder. I think this is technically the same as my conda env, right? And all the binaries in there wont change, if i install packages with pip and conda, right? Is is safe to change the packages in the venv or do you have any tip for me where to look for a fix? As this is the only place, i could find on the internet which has the same error. |
Hi @Marvbuster - thanks for flagging this issue. From the traceback, the error isn't coming from the transformers library. I'd suggest opening an issue in the diffusers repo |
I also getting same issue in M2 Pro Max |
Hi, I am also getting the same issue.
Getting this error for dreambooth. |
you seem to have the same problem, @amyeroberts suggested opening an issue in the diffusers repo, but i haven't done so yet. |
Was someone able to overcome this issue? |
Disable autocast on mps, it's atorch issue not a transfomrers issues |
Thank you, how do I disable autocast when using Automatic1111? |
I would recommend you to open an issue over there! I have no idea how the auto111 code works 😉 |
System Info
transformers: 4.38.2
Python: 3.11.8
macOS: 14.3.1
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Run the following code:
Expected behavior
No error.
The text was updated successfully, but these errors were encountered: