Problem
I'm trying to run the SAM 3 model on my MacBook Air M3, but I keep encountering the following error:
ModuleNotFoundError: No module named 'triton'
I investigated further and found that Triton appears to be designed primarily for CUDA-enabled NVIDIA GPUs. Since Apple Silicon uses Metal (MPS) instead of CUDA, I cannot install or use the required Triton package on macOS.
I also noticed that the installation instructions recommend installing CUDA-specific PyTorch builds, which are not available for macOS.
What I've Tried
Created a fresh Python virtual environment.
Installed the macOS version of PyTorch.
Installed all dependencies listed in the repository.
Tried installing Triton, but it is not available/supported for my platform.
Verified that PyTorch works correctly with MPS.
Despite this, the code still imports triton, which prevents the model from running.
Questions
Is there an MPS-compatible implementation that replaces the Triton kernels?
Is there a branch, fork, or previous commit that works on macOS?
If not, what code changes would be required to replace the Triton operations with standard PyTorch operations so the model can run on Apple Silicon?
Any guidance would be greatly appreciated. Thank you!
Problem
I'm trying to run the SAM 3 model on my MacBook Air M3, but I keep encountering the following error:
ModuleNotFoundError: No module named 'triton'
I investigated further and found that Triton appears to be designed primarily for CUDA-enabled NVIDIA GPUs. Since Apple Silicon uses Metal (MPS) instead of CUDA, I cannot install or use the required Triton package on macOS.
I also noticed that the installation instructions recommend installing CUDA-specific PyTorch builds, which are not available for macOS.
What I've Tried
Created a fresh Python virtual environment.
Installed the macOS version of PyTorch.
Installed all dependencies listed in the repository.
Tried installing Triton, but it is not available/supported for my platform.
Verified that PyTorch works correctly with MPS.
Despite this, the code still imports triton, which prevents the model from running.
Questions
Is there an MPS-compatible implementation that replaces the Triton kernels?
Is there a branch, fork, or previous commit that works on macOS?
If not, what code changes would be required to replace the Triton operations with standard PyTorch operations so the model can run on Apple Silicon?
Any guidance would be greatly appreciated. Thank you!