This repository contains a modified version of the original SLAM3R project, adapted to run on Apple Silicon (M1/M2/M3) Macs using Metal Performance Shaders (MPS) for GPU acceleration instead of NVIDIA CUDA.
0
stars
17
commits
Python
primary language
Aug 23, 2025
updated
This repository contains a modified version of the original SLAM3R project, adapted to run on Apple Silicon (M1/M2/M3) Macs using Metal Performance Shaders (MPS) for GPU acceleration instead of NVIDIA CUDA.
This project would not be possible without the incredible work of the original authors. This repository is a direct fork and adaptation of their research and code. Please be sure to cite their original work.
This fork is intended solely to make this powerful tool accessible to users on Apple hardware.
The original SLAM3R codebase contains hardcoded calls to the NVIDIA CUDA API, which is not available on macOS. The following key modifications were made to enable compatibility:
Modified recon.py:
torch.cuda.set_device).mps (Apple GPU), then cuda, and falling back to cpu.Modified slam3r/utils/device.py:
MyNvtxRange class, used for profiling, was wrapped in a conditional check (if torch.cuda.is_available():) to prevent CUDA-specific calls on non-NVIDIA hardware.These changes make the codebase hardware-agnostic, allowing it to run on both the original NVIDIA platform and on Apple Silicon Macs.
This guide assumes you have Homebrew and Python 3.11 installed.
Clone the Repository:
git clone [https://github.com/jadouse5/SLAM3R_MAC]
cd SLAM3R_MAC
Create a Python Virtual Environment:
python3.11 -m venv myenv
source myenv/bin/activate
Install Dependencies in Order: The installation order is important to ensure compatibility.
# Upgrade pip
pip install --upgrade pip
# Install the correct PyTorch version for Apple Silicon
pip install torch torchvision torchaudio
# Install the remaining packages from requirements.txt
pip install -r requirements.txt
This repository includes a Gradio web interface for easy use.
Launch the App:
Make sure your (myenv) is active and you are in the main project directory.
python app.py
Use the Interface:
Open the provided URL in your web browser. You can upload a video to generate a new 3D point cloud (.ply) file or upload an existing .ply file to view it.
@article{slam3r, title={SLAM3R: Real-Time Dense Scene Reconstruction from Monocular RGB Videos}, author={Liu, Yuzheng and Dong, Siyan and Wang, Shuzhe and Yin, Yingda and Yang, Yanchao and Fan, Qingnan and Chen, Baoquan}, journal={arXiv preprint arXiv:2412.09401}, year={2024} }
Python
95.8%
Shell
2.5%
Cuda
1.0%
This repository contains a modified version of the original SLAM3R project, adapted to run on Apple Silicon (M1/M2/M3) Macs using Metal Performance Shaders (MPS) for GPU acceleration instead of NVIDIA CUDA.
0
stars
17
commits
Python
primary language
Aug 23, 2025
updated
This repository contains a modified version of the original SLAM3R project, adapted to run on Apple Silicon (M1/M2/M3) Macs using Metal Performance Shaders (MPS) for GPU acceleration instead of NVIDIA CUDA.
This project would not be possible without the incredible work of the original authors. This repository is a direct fork and adaptation of their research and code. Please be sure to cite their original work.
This fork is intended solely to make this powerful tool accessible to users on Apple hardware.
The original SLAM3R codebase contains hardcoded calls to the NVIDIA CUDA API, which is not available on macOS. The following key modifications were made to enable compatibility:
Modified recon.py:
torch.cuda.set_device).mps (Apple GPU), then cuda, and falling back to cpu.Modified slam3r/utils/device.py:
MyNvtxRange class, used for profiling, was wrapped in a conditional check (if torch.cuda.is_available():) to prevent CUDA-specific calls on non-NVIDIA hardware.These changes make the codebase hardware-agnostic, allowing it to run on both the original NVIDIA platform and on Apple Silicon Macs.
This guide assumes you have Homebrew and Python 3.11 installed.
Clone the Repository:
git clone [https://github.com/jadouse5/SLAM3R_MAC]
cd SLAM3R_MAC
Create a Python Virtual Environment:
python3.11 -m venv myenv
source myenv/bin/activate
Install Dependencies in Order: The installation order is important to ensure compatibility.
# Upgrade pip
pip install --upgrade pip
# Install the correct PyTorch version for Apple Silicon
pip install torch torchvision torchaudio
# Install the remaining packages from requirements.txt
pip install -r requirements.txt
This repository includes a Gradio web interface for easy use.
Launch the App:
Make sure your (myenv) is active and you are in the main project directory.
python app.py
Use the Interface:
Open the provided URL in your web browser. You can upload a video to generate a new 3D point cloud (.ply) file or upload an existing .ply file to view it.
@article{slam3r, title={SLAM3R: Real-Time Dense Scene Reconstruction from Monocular RGB Videos}, author={Liu, Yuzheng and Dong, Siyan and Wang, Shuzhe and Yin, Yingda and Yang, Yanchao and Fan, Qingnan and Chen, Baoquan}, journal={arXiv preprint arXiv:2412.09401}, year={2024} }
Python
95.8%
Shell
2.5%
Cuda
1.0%