I downloaded the repo and ran SAM2_BUILD_CUDA=0 pip install -e . but when I try using the following (super) minimal test script, it fails with RuntimeError: Placeholder storage has not been allocated on MPS device!. This is being caused by the last line of the example.
import torch
from sam2.build_sam import build_sam2
from sam2.sam2_image_predictor import SAM2ImagePredictor
#122 says it supports MPS, but it doesn't work for me. What are the steps to get a minimal example of SAM2 running on a Mac? My Mac is an M4 if that matters.
I downloaded the repo and ran
SAM2_BUILD_CUDA=0 pip install -e .but when I try using the following (super) minimal test script, it fails withRuntimeError: Placeholder storage has not been allocated on MPS device!. This is being caused by the last line of the example.#122 says it supports MPS, but it doesn't work for me. What are the steps to get a minimal example of SAM2 running on a Mac? My Mac is an M4 if that matters.