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

MPS framework error #10

Open
TomPJWyatt opened this issue May 1, 2023 · 4 comments
Open

MPS framework error #10

TomPJWyatt opened this issue May 1, 2023 · 4 comments

Comments

@TomPJWyatt
Copy link

Hey Jordão, thanks for this plugin, I'm excited to try it!

At the moment I'm getting the below error when I press Auto. Segm.

EmitLoopError: calling <psygnal._weak_callback._WeakMethod object at 0x16e052160> with args=(False,) caused TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead..

@JoOkuma
Copy link
Member

JoOkuma commented May 1, 2023

Hey @TomPJWyatt , thanks for reporting this error.

I'm having trouble reproducing it, can you share the image you're having trouble with?
And can you report the entire error you're getting?

@TomPJWyatt
Copy link
Author

Thanks Jordão, I've emailed you the image and full error

@rouarouatbi
Copy link

I'm also getting the same error for my images

@JoOkuma
Copy link
Member

JoOkuma commented Sep 6, 2023

Hi @rouarouatbi, the official segment-anything still needs to accept the changes to fix this issue.

You can install the necessary changes, facebookresearch/segment-anything#122, with

pip install git+https://github.com/DrSleep/segment-anything@mps-support

And you have to set the environment variable PYTORCH_ENABLE_MPS_FALLBACK=1.

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