Comparison · SAM 3 / 3.1 vs SAM 2 / 2.1
SAM 3 vs SAM 2: Prompting, Workflows and Practical Trade-offs SAM 2 segments what you point at. SAM 3 finds everything you describe. Here’s how that changes your prompts, your pipeline and your costs.
Short answer
The Verdict
Choose SAM 3 (ideally SAM 3.1) when you want to describe what to find, need every instance, or want the best masks; it beats SAM 2 even on clicks. Choose SAM 2.1 when clicks are enough and you need small, fast models (down to 38.9M parameters), edge hardware, ungated downloads or the Apache 2.0 licence. Many teams use both.
Side by side
SAM 3 vs SAM 2 at a Glance
Green marks the stronger option for each row; trade-offs depend on your project.
| SAM 2 / 2.1 | SAM 3 / 3.1 | |
|---|---|---|
| Released | 29 Jul 2024 (2.1: 29 Sep 2024) | 19 Nov 2025 (3.1: 27 Mar 2026) |
| Core task | Promptable visual segmentation (PVS) | PVS + Promptable Concept Segmentation (PCS) |
| Prompts | Clicks, boxes, masks | Clicks, boxes, masks + text + example boxes |
| Finds every instance | No, one object per prompt | Yes, every match with IDs |
| Backbone | Hiera image encoder | Meta Perception Encoder + DETR-style detector |
| Video tracking | Streaming memory | Builds on SAM 2’s memory; 3.1 adds Object Multiplex |
| Sizes | 4: 38.9M–224.4M | 1: ~848M |
| Speed (vendor figures) | 39.5–91.2 FPS on A100 | ~30 ms/image (H200); near real-time ~5 objects; 3.1 ~32 FPS (H100) |
| SA-V test J&F | 79.5 (2.1 Large) | 84.4 (3.1: 85.1) |
| Requirements | Python 3.10+, PyTorch 2.5.1+ | Python 3.12+, PyTorch 2.7+, CUDA 12.6+ |
| Weights access | Direct download | Gated on Hugging Face (request access) |
| Training code | Yes | Yes, plus fine-tuning code |
| Licence | Apache 2.0 | SAM License (commercial use with restrictions) |
| Transformers / Ultralytics | Yes / Yes | Yes (SAM 3) / Yes |
Prompting
How Prompting Differs
SAM 3 keeps every SAM 2 prompt and adds concept prompts. The bigger change is what one prompt returns.
SAM 2: “this one”
- Positive and negative clicks, a box, or a mask on one object.
- One object per prompt; for ten objects you prompt ten times.
- Ambiguity handling: a single click can return several candidate masks (part vs whole).
SAM 3: “every X” or “this one”
- Text: a short noun phrase like “yellow taxi” returns every match.
- Example boxes: positive and negative boxes for look-alikes or things hard to name.
- Clicks still work for one object, with better masks than SAM 2.
- Limit: short phrases only; complex requests need SAM 3 Agent.
More: SAM 3 prompts guide
Image workflows
Image Workflows Compared
With SAM 2
- Interactive cut-outs: click, refine, export. Fast and familiar.
- Label every object: run the automatic mask generator, then name masks yourself, or add a separate detector.
- Text-driven: chain a text detector (e.g. Grounding DINO) → boxes → SAM 2. Two models to run and tune.
With SAM 3
- Interactive cut-outs: same click flow, sharper masks.
- Label every object: type the class name; get masks, boxes and scores for each instance.
- Text-driven: built in. One model, one call; add negative example boxes to clean up.
Guide: SAM 3 image segmentation
Video workflows
Video Workflows Compared
Both track through video with memory. The difference is how objects get into the tracker.
- SAM 2: click or box each object on a frame, then propagate. New objects entering later need new clicks.
- SAM 3: one text or example prompt finds every match; its detector also picks up new matches as they appear.
- Crowds: SAM 3’s cost grows per object; SAM 3.1 tracks up to 16 per pass. SAM 2.1 Tiny stays very fast for a few objects.
- Corrections: both let you click on a frame where a mask drifts and re-propagate.
In code
The Same Task in Code
Tracking players through a clip. SAM 2 needs one prompt per player; SAM 3 needs one phrase.
SAM 2.1
predictor = build_sam2_video_predictor(cfg, ckpt)
state = predictor.init_state(video_path="match_frames/")
# one call per object you want to follow
predictor.add_new_points_or_box(state, frame_idx=0, obj_id=1,
points=[[210, 350]], labels=[1])
predictor.add_new_points_or_box(state, frame_idx=0, obj_id=2,
points=[[480, 330]], labels=[1])
for frame, ids, masks in predictor.propagate_in_video(state):
...SAM 3 / 3.1
predictor = build_sam3_video_predictor()
sid = predictor.handle_request(request=dict(
type="start_session", resource_path="match.mp4"))["session_id"]
# one call finds every player, each with an ID
out = predictor.handle_request(request=dict(
type="add_prompt", session_id=sid,
frame_index=0, text="player"))Simplified from the official sam2 and sam3 repositories; check their notebooks for full setup.
Accuracy
Accuracy: SAM 3 Wins, Even at SAM 2’s Own Game
SAM 3 isn’t only better at concepts. It also beats SAM 2 on click-based tasks.
- Video object segmentation: SA-V test J&F 79.5 (SAM 2.1 Large) → 84.4 (SAM 3) → 85.1 (SAM 3.1).
- Hard, crowded video: 60.1 J&F on MOSEv2, about 25.5% above SAM 2.1.
- Interactive images: better average mIoU than SAM 1 and SAM 2 with 1 or 5 clicks on Meta’s 37-dataset benchmark.
- Concepts: SAM 2 can’t do concept segmentation at all; SAM 3 roughly doubles earlier systems on SA-Co.
- Your data may differ: independent medical studies found mixed results, so test on your own images.
Size and speed
Model Size, Speed and Hardware
This is where SAM 2.1 still shines.
- SAM 2.1 sizes: Tiny 38.9M (91.2 FPS), Small 46M (84.8), Base+ 80.8M (64.1), Large 224.4M (39.5), on an A100.
- SAM 3: one ~848M model, about 30 ms per image on an H200; video is near real-time for about 5 objects (SAM 3.1: ~32 FPS on an H100 at medium counts).
- Requirements: SAM 2 needs Python 3.10+ and PyTorch 2.5.1+; SAM 3 needs Python 3.12+, PyTorch 2.7+ and CUDA 12.6+.
- Edge and mobile: SAM 2.1 Tiny or Small are far easier to fit on small GPUs and devices.
Details: system requirements
Licence and access
Licence and Access
SAM 2 / 2.1
- Apache 2.0 for checkpoints, demo and training code.
- Direct download of checkpoints; no access request.
- Usually the quickest legal review for client and commercial work.
SAM 3 / 3.1
- SAM License: royalty-free, commercial use allowed.
- Restrictions: no military, weapons, espionage or sanctioned uses; pass the licence on when sharing.
- Gated weights: request access on Hugging Face first. Summary: terms (not legal advice).
Practical trade-offs
Practical Trade-offs by Scenario
| Scenario | Better choice | Why |
|---|---|---|
| Auto-label a dataset by class name | SAM 3 | Text prompt returns every instance with boxes and scores. |
| Click-to-cut-out in an editor | Either | SAM 3 is sharper; SAM 2.1 is lighter and faster to serve. |
| Real-time tracking on a robot or phone | SAM 2.1 Tiny/Small | Small models, high FPS, easier deployment. |
| Sports or traffic with many objects | SAM 3.1 | Finds all players or vehicles; multiplex keeps it fast. |
| Rare objects that are hard to name | SAM 3 | Example boxes find look-alikes. |
| Strict licence or air-gapped setup | SAM 2.1 | Apache 2.0 and ungated downloads. |
| Medical or niche imagery | Test both | Results vary by domain; fine-tuning often matters more. |
| Existing SAM 2 pipeline that works | Stay, then test SAM 3 | Migrate when text prompts or accuracy justify the bigger model. |
Use both
Combining SAM 3 and SAM 2
You don’t have to choose one. Many pipelines use SAM 3 to find and SAM 2.1 to follow.
- 1FindRun SAM 3 on a server with a text prompt on key frames.
- 2Hand overPass the boxes or masks to SAM 2.1 as prompts.
- 3Track cheaplySAM 2.1 Tiny or Small follows them on edge or low-cost GPUs.
- 4Re-checkRun SAM 3 again every few seconds or at scene cuts to catch new objects.
Mind both licences: the SAM License still applies to the SAM 3 part.
Migrating
Migrating From SAM 2 to SAM 3
There’s no drop-in path: SAM 3 is a different model with its own package and API.
- 1Decide whyText prompts, every-instance output or accuracy. If none matter, stay on SAM 2.1.
- 2Set upPython 3.12+, PyTorch 2.7+, CUDA 12.6+; request access to facebook/sam3.1; install facebookresearch/sam3. See install SAM 3.
- 3Port promptsKeep click prompts where you need one object; replace per-object loops with one text or example prompt.
- 4Update outputsExpect masks, boxes, scores and IDs per match; map them to your existing formats.
- 5BenchmarkCompare masks, speed, GPU memory and cost on your own data before switching.
Questions
SAM 3 vs SAM 2 FAQ
What is the main difference between SAM 3 and SAM 2?
SAM 2 segments and tracks the objects you point at with clicks, boxes or masks. SAM 3 can also find every object matching a short text phrase or example box, such as “dogs”, and track them all, in one model.
Is SAM 3 more accurate than SAM 2?
Yes, including on SAM 2’s own tasks. SAM 3 scores 84.4 J&F on SA-V test against 79.5 for SAM 2.1 Large, is about 25% better on the hard MOSEv2 benchmark, and beats SAM 2 on interactive image segmentation.
Is SAM 2 faster or smaller than SAM 3?
Yes. SAM 2.1 comes in four sizes from 38.9M to 224.4M parameters, running at about 39 to 91 FPS on an A100. SAM 3 is a single 848M-parameter model that needs a stronger GPU.
Can SAM 2 use text prompts?
No. SAM 2 only accepts points, boxes and masks. For text you need SAM 3, or a separate text detector such as Grounding DINO feeding boxes into SAM 2.
Which has the better licence for commercial use?
SAM 2 and 2.1 checkpoints and code use Apache 2.0, which is simpler for most legal reviews. SAM 3 uses the SAM License: commercial use is allowed, but with use restrictions and pass-through terms.
Should I migrate from SAM 2 to SAM 3?
Migrate if you need text or example prompts, want to find every instance automatically, or want the best accuracy. Stay on SAM 2.1 if clicks are enough and you need small models, edge devices or Apache 2.0.
Can I use SAM 3 and SAM 2 together?
Yes. A common pattern is to use SAM 3 on a server to find objects from a text prompt, then hand the boxes or masks to a small SAM 2.1 model to track them on cheaper or edge hardware.