You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrated from segment-anything (SAM 1) to sam2 (SAM 2.1) across the entire codebase
SAM 2.1 checkpoint: sam2.1_hiera_large.pt (~900MB, down from ~2.4GB)
All notebooks, core library, docs, and dependencies updated
Cross-Platform GPU Support
Automatic device detection (CUDA / MPS / CPU) for all build_sam2() calls
macOS Apple Silicon: TensorFlow via Metal + PyTorch via MPS in the same environment
Pinned tensorflow<=2.18.1 for tensorflow-metal compatibility
Breaking Changes
Python ≥3.10 required (SAM 2 dependency)
segment-anything replaced by sam2 — update your imports:
# Old (v0.2.x)fromsegment_anythingimportsam_model_registry, SamPredictor# New (v0.3.0)fromsam2.build_samimportbuild_sam2fromsam2.sam2_image_predictorimportSAM2ImagePredictor
SAM checkpoint changed: download sam2.1_hiera_large.pt from here