facebookresearch / facebookresearch/sam3
Inference speed is significantly slower than SAM2 (5-6 FPS vs 30+ FPS on H200)
- Dominant language
- Python
- Stars
- 11.7k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
I am observing a significant performance gap between SAM3 and SAM2 during video propagation. On a single NVIDIA H200 (141GB), SAM3 achieves only 5-6 FPS for a 1080p video, while SAM2 can easily exceed 30 FPS on the same hardware and video.
I've noticed that model_builder.py and sam3_video_predictor.py do not explicitly expose precision settings (like fp16 or bf16), and some parts of video_base.py (e.g., in run_tracker_propagation) seem to cast tensors back to float32 before communication.
Contributor guide
Research direction
Read model_builder.py and sam3_video_predictor.py first, then trace run_tracker_propagation in video_base.py, paying attention to the reported float32 casts and unavailable precision settings. Profile the 1080p video path on an H200; done means identifying and addressing the relevant inference bottleneck and demonstrating a measured FPS improvement against the reported baseline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, machine-learning, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100