-
-
Notifications
You must be signed in to change notification settings - Fork 833
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 Support #22
Comments
I am on a Mac studio M2 Ultra 128 GB, Sonoma 14.1.2
I tried to install and compile insightface from source, but did not work. |
try
|
Thank you a lot for the quick response. |
Thank you for open sourcing the code.
I was trying to get this to work on Mac MPS machines, and got it to work but not sure if I am doing it correctly since I didn't dig deep into the code. I'll just share the parts I updated from the original gradio demo on huggingface:
torch_dtype
of float32 for MPS (otherwise it keeps giving me black images) and use enable attention slicing: https://huggingface.co/spaces/cocktailpeanut/InstantID/blob/main/app.py#L53-L76It works, but it uses a lot of memory, so I was wondering if there's a better way. Also even though it's working, I might be completely missing some parts or making a mistake. Would appreciate feedback. It's very fast on CUDA but on MPS takes much longer, so hopefully there's a way to improve the speed as well. Thank you!
The text was updated successfully, but these errors were encountered: