kadirnar / segment-anything-video

MetaSeg: Packaged version of the Segment Anything repository
Apache License 2.0
946 stars 67 forks source link

Supporting Apple M1 ? #70

Closed csv610 closed 1 year ago

csv610 commented 1 year ago

Hello,

Does anyone knows how can we use device=mps on Apple M1 Chip in MetaSeg apps?

Thanks

onuralpszr commented 1 year ago

I was writing examples and while I doing that I was able to run under Apple silicon I used M2, plus MetaSeg depends to pytorch and pytorch has support for apple-silicon. In their website they said

# MPS acceleration is available on MacOS 12.3+
pip3 install torch torchvision torchaudio

(https://github.com/kadirnar/segment-anything-video/pull/76) I am closing this issue as fixed

Thank you.

csv610 commented 1 year ago

Hello, Thank you very much. However, I still get the error:

 "Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead."

I was writing examples and while I doing that I was able to run under Apple silicon I used M2, plus MetaSeg depends to pytorch and pytorch has support for apple-silicon. In their website they said

MPS acceleration is available on MacOS 12.3+

pip3 install torch torchvision torchaudio

(#76) I am closing this issue as fixed

Thank you.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

onuralpszr commented 1 year ago

@csv610 can you elaborate how did you manage get this error ? at least tell us what you did step by step and share your minimal code we can also try as well.