Alternatives to SAM 2 / SAM 2.1: which mask model for which job
The right alternative to SAM 2 depends on which wall you hit. Masks named by plain text moved to SAM 3, and Meta now sells that model per image on its own rate card. Raw speed on a small device belongs to MobileSAM and FastSAM. A fixed class list at camera rate belongs to YOLO. Most of this choice is license law, not benchmark scores. Every license and rate below was read at its source on 28 October 2026.
Last verified: 2026-10-28
That is the whole map in six sentences. The rest is evidence. It covers what each rival does well, what each license permits, who sells masks per image, and what this platform serves.
What you are actually replacing
SAM 2 is Meta's promptable segmentation model for images and video. It shipped on July 29, 2024. The retrained SAM 2.1 checkpoints followed on September 29, 2024. Four tiers span 38.9 million to 224.4 million parameters. Point at something, or box it, and the model returns a mask. In video mode a memory bank carries the mask across frames. The version-by-version story, delta tables included, sits on SAM 2 vs SAM 2.1.
One license covers the whole 2.x family. The repository states it plainly: "The SAM 2 model checkpoints, SAM 2 demo code (front-end and back-end), and SAM 2 training code are licensed under Apache 2.0" (the repository). Weights, inference code, and training code, all Apache 2.0, in both generations. That fact shapes every row below, because most rivals cannot say the same.
Then the ground moved. SAM 3 shipped in November 2025 with a new job: promptable concept segmentation. Send a short noun phrase, like "delivery van", and the model finds every match. SAM 3.1 followed on March 27, 2026 as a drop-in update. It tracks up to 16 objects in one forward pass, at a printed 16 to 32 frames per second on one H100 (the SAM 3 post). The catch is access. The SAM 3.1 checkpoints sit behind a manual approval request on Hugging Face. They ride a custom SAM License dated November 19, 2025, not Apache (the SAM 3 repository). The 2.1 checkpoints remain the line you download and ship without asking anyone.
The decision map, job by job
Masks named by plain text. This job has left the 2.x family. SAM 3 takes open-vocabulary noun phrases and image examples, and it returns a box and a mask for every match. The catch is the ask: checkpoint access is a manual request, and the license is Meta's own terms, not Apache. If text-named masks must stay open and ungated today, the EVF-SAM class of text-prompted adapters is the open corner, and one such adapter is served on fal. The first-party hosted route is Meta's own model API, priced in the table two sections down.
Masks on a small device, fast. Look at the lightweight forks of SAM 1. MobileSAM swaps the 632 million parameter encoder for a 5 million parameter Tiny-ViT and runs about 12 milliseconds per image on a single GPU, 8 on the encoder and 4 on the decoder (the MobileSAM repository). FastSAM takes another road, a YOLOv8 backbone trained on 2 percent of the SA-1B dataset, and prints a flat 40 millisecond run per image on one RTX 3090 against 446 for SAM-H, with a "50x higher run-time speed" claim in its own README (the FastSAM repository). EfficientSAM offers two small builds, ViT-Tiny and ViT-Small. Read the license column before any of these reach a product. FastSAM rides YOLOv8, and its repository license is AGPL-3.0.
Fine edges and thin structures. The complaint recurs in community threads: mask edges on hair, leaves, and thin parts. HQ-SAM is the direct answer for the SAM 1 line. It adds a learnable high-quality output token to the mask decoder, keeps the frozen SAM weights, and trains only that token on 44 thousand fine-grained masks. Light HQ-SAM reaches a printed 41.2 frames per second (the HQ-SAM repository). For the 2.x line, the honest answer is that no published HQ fork of SAM 2.1 exists at this read. Tighten masks by prompt engineering, or fine-tune on your own data with the released training code.
A fixed class list, at camera rate. If you know the ten things you need to find, a promptable zero-shot model is the wrong tool. A class-trained segmenter like YOLO or Mask2Former runs an order of magnitude faster per frame and returns names, not just masks. Mask2Former ships under MIT. The YOLO ecosystem ships under AGPL-3.0 unless you buy an enterprise license (Ultralytics licensing). The full segmentation-versus-detection walkthrough, with the served-model rows, sits on SAM 2 vs YOLO.
Medical and scan images. Domain forks exist and ship under Apache 2.0. MedSAM is the best known, trained for medical images. Note what the field reports: an evaluation across 24 organ-modality combinations found that SAM 2 does not generally surpass SAM 1 on medical images (the study). A domain fork earns its keep on domain data, not on the 2.x upgrade. For robot vision beyond masks, the depth side of the house has its own map on alternatives to Depth Anything.
Track one object through video. SAM 2 tracks, but it was not built as a tracker. SAMURAI adapts SAM 2 for zero-shot visual tracking with motion-aware memory and holds state-of-the-art rows on tracking benchmarks like LaSOT (the SAMURAI repository). If you want tracking without SAM at all, Cutie and XMem are dedicated video object segmentation trackers, both MIT licensed. The robotics pattern that pairs a tracker with a depth model is drawn on robot vision, segmentation and depth.
Where SAM 2.1 wins
- One Apache 2.0 grant covers weights, inference code, and training code, in all four tiers, in both generations.
- Zero-shot masks from any point or box, on images and video, from one model.
- The 2.1 large tier holds 79.5 J&F on SA-V test at the repo's published protocol, read 28 October 2026.
- The training code ships, so fine-tuning on your own masks is a supported path, not a hack.
- A served per-image lane exists on this platform, with the base-plus tier under the model id sam2.1-base.
Where it loses
- No text prompts. You cannot ask 2.x for "the striped umbrella", only point at one. That job belongs to SAM 3.
- The encoder is the cost. The large tier prints 39.5 frames per second on an A100 in the zoo table, and nothing about that fits a small onboard computer.
- Automatic mask generation over a whole frame is the slow mode. Its stock sweep runs a 32 by 32 point grid, 1,024 prompts deep, before the first mask returns. The mechanics and the cost are documented on the AMG page.
- No class names come back. Masks only. Anything semantic needs a second model.
- The current-generation perks, text prompts and first-party hosting, live on the gated 3.x line, not here.
What each license lets you ship
Licenses decide this market before speed does. Every row was read at the named repository's license file on 28 October 2026, at raw-byte level. The commercial-use column is our reading of the license text. It is not legal advice.
| Model | License as published | Commercial use |
|---|---|---|
| SAM 2 and SAM 2.1, all four tiers each | Apache 2.0 (checkpoints, code, training) | Yes |
| SAM 3 and SAM 3.1 | SAM License, dated 2025-11-19, manual access request | Yes, under its terms |
| FastSAM | AGPL-3.0 | Copyleft: open-source your whole project |
| MobileSAM | Apache 2.0 | Yes |
| EfficientSAM | Apache 2.0 | Yes |
| HQ-SAM | Apache 2.0 | Yes |
| MedSAM | Apache 2.0 | Yes |
| SAMURAI | Apache 2.0 | Yes |
| Cutie | MIT | Yes |
| XMem | MIT | Yes |
| Mask2Former | MIT | Yes |
Two rows deserve a second look. FastSAM is the trap. It performs a SAM-shaped job but carries the YOLOv8 copyleft. A closed product built on it needs a separate commercial license conversation. And the SAM 3 row is "yes, under its terms" rather than a bare yes. The SAM License grants broad rights, derivative works included. It adds acceptable-use conditions, export rules, and a no-reverse-engineering clause. Read it before you build.
The hosted shelf, priced per deployed eye
For a robot, the meter is the product. Two sellers can serve the same model at two prices because the meter differs. Every rate below was read on the seller's own page on 28 October 2026. Where a page prints no rate, the cell carries a dash, not a guess.
| Seller | What it serves | The meter | Printed rate, one basis | Per-eye read |
|---|---|---|---|---|
| Meta Model API | sam-3.1, stills and clips | Per image, per video frame | 2.50 per 1,000 images, 0.20 per 1,000 frames, 50-frame floor per video request (pricing page) | 0.0025 per image |
| fal | SAM 2 image, video, auto-segment, plus SAM 3 and 3.1 | Per request on SAM 3 rows, compute seconds on SAM 2 rows | SAM 3.1 image prints 0.01 per request; the SAM 2 image page prices compute seconds with the field reading 0 (the model page) | 0.01 per request on SAM 3.1; SAM 2 cost unpriced on the page |
| Replicate | meta/sam-2, large tier, images only | Per run | About 0.041 per run, 24 runs per US dollar, typical run 42 seconds (the model page) | No loop pays a 42 second wait per frame |
| Roboflow | SAM 3 serverless and stream | Credits per image | 0.0005 credits per image, 2,000 images per credit; a credit costs 3.90 at the entry paid tier (pricing page) | About 0.002 per image at the entry credit price |
| Segmind | SAM v2 image | Per GPU second | 0.0072 per GPU second, typical run 1.57 seconds (pricing page) | About 0.011 per call at the typical run |
| Slaice | Segment Anything API | Tokens per call | 1 token per call, about 5 seconds average response (the info page) | Token market, no dollar figure printed |
| ModelRunner | No SAM row found | - | - | Checked at the catalog index and by direct slug lookups, calibrated against a known-live page, all negative |
| WaveSpeed | SAM 3 image, video, and RLE rows plus 3D variants; no SAM 2 row in a full catalog sweep of 24 pages and 1,113 rows | Per image on the image row, per 5 seconds of video on the video row | Image page prints 0.005 per image, fixed, no add-on charges; video page prints 0.05 per 5 seconds with a 3 second floor and 600 second cap (the image model page) | 0.005 per image; video 0.05 per 5 seconds works out to 0.01 per second |
| Hugging Face providers | Neither SAM 2.1 large nor SAM 3.1 carries a provider | Not applicable | Empty provider mapping on both model pages | The download shelf, not the call shelf |
Three relations fall out of the table. Meta's own image rate, 0.0025 per image, sits below every priced third-party SAM 2 row on the board. Its video rate, 0.0002 per frame, is the lowest unit price printed anywhere on this page. The 50-frame floor is the small-print catch. The per-run and per-GPU-second sellers price a labeling job, not a camera loop. One charges about 0.041 and takes 42 seconds. The other derives its bill from run time. And the platform below prices a flat per-image unit with no run-time term.
The wider seller census, every meter and every model row on one board, sits on robot vision API alternatives. Do the big model hosts serve robot models at all? That question has its own receipts on the big-hosts survey.
What this platform serves
The base-plus tier of this family runs as a hosted lane on this platform's vision route, under the model id sam2.1-base. It has served since 6 October 2026 and sits on the public list as of 28 October 2026. The lane runs the automatic mode by design: whole image in, every mask out, no prompt fields. The mechanics, the 400 behavior on prompted fields, and the record format belong to the AMG page. Its model sheet is sam2.1-base. The large tier is not on the public list, and no date rides with it.
Billing counts images, not masks and not requests. One image in, one image billed, and a refused request bills nothing. The response carries a usage block with the billed count. A first call is four fields and a file:
curl -sS $IRONSTRATUM_BASE_URL/v1/vision \
-H "Authorization: Bearer $IRONSTRATUM_API_KEY" \
-F "model=sam2.1-base" \
-F "file=@frame.jpg" \
-F "response_format=json"
import os
import requests
resp = requests.post(
os.environ["IRONSTRATUM_BASE_URL"] + "/v1/vision",
headers={"Authorization": "Bearer " + os.environ["IRONSTRATUM_API_KEY"]},
data={"model": "sam2.1-base", "response_format": "json"},
files=[("file", open("frame.jpg", "rb"))],
timeout=30,
)
resp.raise_for_status()
answer = resp.json()
print(len(answer["annotations"]), "mask objects, billed", answer["usage"]["images"], "images")
Rates render on the pricing page, never typed by hand on pages like this one:
| Model | Context | $/1M in | $/1M out | $/1M cached |
|---|---|---|---|---|
| Qwen | ||||
| qwen3.8-27b | 262K | $0.35 | $2.55 | $0.105 |
| qwen3.6-35b | 131K | $0.11 | $0.8 | $0.044 |
| Minimax | ||||
| minimax-m2.7 | 197K | $0.24 | $0.95 | $0.072 |
| Muse | ||||
| muse-glimmer-30b | 131K | $0.28 | $1.2 | $0.084 |
| Ornith | ||||
| ornith-1.5-35b | 100K | $0.35 | $2.55 | $0.105 |
| ornith-1.5-9b | 100K | $0.1 | $0.3 | $0.03 |
| Glm | ||||
| glm-5.3-flash | 1049K | $0.11 | $0.35 | $0.033 |
| Deepseek | ||||
| deepseek-v4-flash-0731 | 1311K | $0.15 | $0.42 | $0.045 |
| Gemma | ||||
| gemma-4-31b-it | 262K | $0.22 | $0.49 | $0.066 |
| Deepseek | ||||
| deepseek-v4-pro | 1000K | $1.13 | $2.21 | $0.339 |
| deepseek-v4.1-flash | 1000K | $0.19 | $0.71 | $0.06 |
| deepseek-v4.1-flash-1017 | 1049K | $0.16 | $0.65 | $0.003 |
| Glm | ||||
| glm-5.3 | 1000K | $1.32 | $4.25 | $0.4 |
| Flux | ||||
| flux-1-schnell | — | $0.003/image | ||
| flux-pro-1.1 | — | $0.04/image | ||
| Chatterbox | ||||
| chatterbox-tts | — | $25/1M chars | ||
| Kokoro | ||||
| kokoro-tts | — | $15/1M chars | ||
| pocket-tts | — | $16/1M chars | ||
| Audio | ||||
| audio8-tts | — | $8/1M chars | ||
| Hayamimi | ||||
| hayamimi-stt | — | $0.6/audio-hr | ||
| Bge | ||||
| bge-m3 | — | $0.05/1M tokens | ||
| bge-reranker-v2-m3 | — | $1.5/1k searches | ||
| Ocr | ||||
| ocr-print | — | $1/1k pages | ||
| ocr-archival | — | $3/1k pages | ||
| Whisper | ||||
| whisper | — | $0.12/audio-hr | ||
| Iab | ||||
| iab-2x | — | $0.7/1k pages | ||
| iab-3x | — | $0.7/1k pages | ||
| Gliner | ||||
| gliner-extract | — | $0.9/1k searches | ||
| Jev | ||||
| jev-fast | 1K | $0.03 | $0 | — |
| jev-causal | 1K | $0.03 | $0 | — |
| jev-batch | 1K | $0.03 | $0 | — |
| Wemm | ||||
| wemm-embed | — | $0.09/1M tokens | ||
| Molmo | ||||
| molmo2-er | 8K | $1 | $5 | $0.5 |
| Cosmos | ||||
| cosmos-reason2-2b | 4K | $0.1 | $0.4 | $0.05 |
| Sam | ||||
| sam2.1-base | — | $0.02/image | ||
| Da | ||||
| da3-small | — | $0.05/image | ||
| Smolvla | ||||
| smolvla | — | $0.001/call | ||
| Openvla | ||||
| openvla-oft | — | $0.006/call | ||
| Act | ||||
| act | — | $0.001/call | ||
Open an account on the signup page. Create a key. Send one frame before you batch. For the budget math over a whole run, see the specialty unit economics page.
Choose by the job you are escaping
- Text-named masks, hosted: Meta's model API, 0.0025 per image, and read the SAM License first.
- Text-named masks, open weights: no ungated open option exists at this read. That absence is the finding.
- Speed on a small device: MobileSAM at about 12 milliseconds per image, Apache 2.0, or Light HQ-SAM at 41.2 frames per second when edges matter.
- A fixed class list at rate: YOLO or Mask2Former, not any SAM, and settle the AGPL question before YOLO enters a product.
- Fine edges: HQ-SAM on the SAM 1 line, or fine-tune SAM 2.1 yourself with the released training code.
- Medical work: MedSAM for the domain fit, with tempered expectations for any SAM generation on scans.
- Tracking one object: SAMURAI on top of SAM 2, or Cutie and XMem with no SAM inside.
- Masks as a paid call with no GPU in the plan: the table above, decided by meter first and price second.
Questions builders ask
What is the best alternative to SAM 2?
There is no single best, only a best per job. Text prompts moved to SAM 3, gated and hosted. Device speed belongs to MobileSAM and FastSAM, with FastSAM's AGPL as the string. Fixed class lists belong to YOLO or Mask2Former. Fine edges belong to HQ-SAM. Tracking belongs to SAMURAI, Cutie, or XMem. Pick the row that matches the wall you actually hit.
Is FastSAM faster than SAM 2?
Yes, per its own README, and read the basis. FastSAM prints a flat 40 millisecond run per image on one RTX 3090, against 446 milliseconds for SAM-H at one prompt. SAM 2 is a different design. On an A100 its tiers print 39.5 to 91.2 frames per second in the repo zoo table. Its small tiers are themselves fast. FastSAM's speed claim is against SAM 1's heavy tier, not against SAM 2 small.
Can I use SAM 3 instead of SAM 2.1?
For text-named masks, yes, and Meta serves it per image. For open shipping, the paths differ. SAM 3.1 checkpoints need a manual access request and ride the custom SAM License. SAM 2.1 downloads today under Apache 2.0 with no gate. If your product needs promptable masks with no approval queue and no license review beyond Apache, 2.1 remains the shipping line.
Is SAM 2 free for commercial use?
Yes. The repository license covers the checkpoints, the demo code, and the training code under Apache 2.0, for both the 2.0 and 2.1 checkpoint sets. That is the family's quiet advantage over most rivals: no tier split, no gated tier, no copyleft.
Which SAM 2 alternative is best for video tracking?
SAMURAI, if you want to stay on SAM 2. It adds motion-aware memory for zero-shot tracking and leads the tracking benchmark rows its repository lists. Cutie and XMem are the SAM-free options, both MIT. Plain SAM 2 video mode tracks, but it was built for promptable segmentation, not tracker-grade robustness.
Who serves SAM 2 as a hosted API?
fal carries SAM 2 image, video, and auto-segment listings. Replicate serves the large tier, images only, per run. Segmind serves SAM v2 per GPU second. Slaice sells a Segment Anything API for tokens. Hugging Face carries the weights but no serving provider for the large tier. This platform serves the base-plus tier per image on its vision route.
Last verified: 2026-10-28