AiStream

ModelsMeta AI

SAM 3.1, Meta's model that cuts out and tracks the object you name

Type "hot air balloon" or "orange climbing hold", and SAM 3.1 outlines every matching object in the image or video, then tracks it from frame to frame. Here is what developers have built with it, how to try it, and what it does badly.

By AiStream10 min read

SAM 3.1 is a vision model that Meta released on March 27, 2026. SAM stands for Segment Anything Model. You give it an image or a video and the name of an object, for example "yellow school bus", and it traces the outline of every yellow school bus down to the pixel. In a video, it tracks each object from one frame to the next and keeps the same number for it. In the version you install yourself, you can also click on the object or draw a box around it instead of typing its name.

Matt Deitke, an AI researcher at Meta, tried it on a photo of hot air balloons with the words "hot air balloon". Each balloon it finds gets its own color, including the smallest ones on the horizon.

Matt Deitke@mattdeitkeSAM 3.1 is out! It's open source and available through the Meta API and Hugging Face for image and video segmentation. SAM is a standard foundation model for computer vision at this point. The changes from SAM 3 are mostly architectural, which make inference ~7× faster in some cases for segmentation of lots of objects without sacrificing accuracy. I tried it with the prompt "hot air balloon." 🎈1257505

The first two versions of SAM worked only with clicks or boxes. SAM 3, released in November 2025, added search by text. SAM 3.1 keeps the same ways of pointing to an object and changes how it tracks several objects in a video. SAM 3 ran a full computation for each tracked object. SAM 3.1 handles up to 16 of them together. According to Meta, a video with a medium number of objects goes from 16 to 32 frames processed per second on an Nvidia H100 graphics card, and with 128 objects processing is about 7 times faster than with SAM 3.

Since September 18, SAM 3.1 is also available in Meta's API, which charges per frame: $2.50 per 1,000 photos, $0.20 per 1,000 video frames. One minute of video at 30 frames per second therefore costs 36 cents.

Meta for Developers@MetaforDevsMeta’s Segment Anything Model (SAM) 3.1 is now available on Meta Model API, giving developers a fast and lightweight model for detection, segmentation and tracking in a single call on inference tuned for SAM 3.1's architecture. Use a short phrase to find objects in images and video. One API call returns detections, pixel-precise segmentation masks, and identity-preserving video tracks. Learn more and start building: https://bit.ly/4rDArq9532602.1K

A climbing route rebuilt in 3D

Jeremy Park, who holds a PhD in computer vision and works as an engineer at VLM Run, a company that provides access to vision models, builds demos around sports. For the latest one, he filmed a climber on a bouldering wall with his iPhone 15 Pro, whose LiDAR sensor records the distance of every point in the image. His program rebuilds the wall in 3D, places the holds and the climber in it, and measures the route in meters.

Jeremy Park presents his 3D climbing analysis tool.

SAM 3.1 handles the holds. In a climbing gym, a route is the set of holds of the same color, and the program simply asks SAM 3.1 to find the "orange climbing hold". The setting is one line: change the color and the program follows another route on the same wall. SAM 3.1 receives the whole video and tracks each hold from frame to frame. Because the VLM Run service accepts at most 128 frames per video, Jeremy Park sends it one frame out of every 11, or one every 0.37 seconds.

The depth measured by the iPhone then places each hold in space. Another model, ViTPose+, finds the position of the climber's hands, feet and joints. A hand only counts as placed on a hold if it touches the hold in the image and is close enough to it in 3D. The timer starts when both feet leave the ground and stops when both hands are on the last hold.

The route rebuilt in 3D by Jeremy Park's tool: 12 holds used in order, 3.22 m high, 16.63 seconds.
The route rebuilt in 3D by Jeremy Park's tool: 12 holds used in order, 3.22 m high, 16.63 seconds.

The program produces the video and the 3D route side by side, and a file of the wall that opens in Blender. His code is published under the Apache 2.0 license. On Hacker News, Jeremy Park explains that the holds that were touched are detected better than in his previous 2D version, and that the result looks like a video game.

Finding a sticker among 782 laptops

Jack Gangi collects photos of the backs of laptops covered in stickers on stickertop.art. Chuanqi Sun, a researcher at the MIT Media Lab, turned the collection into Stickerbase, a search engine for stickers.

He described his method on Hacker News. SAM 3.1 cuts out every sticker from every photo. A Google model, Gemini Embeddings 2, then turns each sticker into a series of numbers that describes what it shows, and the search compares these numbers directly in the browser. You type "Octocat" or "penguin", and the site shows the laptops that carry that sticker.

One of the 782 laptops in Stickerbase. Below the photo, one button per cut-out sticker, 32 for this one.
One of the 782 laptops in Stickerbase. Below the photo, one button per cut-out sticker, 32 for this one.
Sticker no. 5 on this laptop, as the site cut it out.
Sticker no. 5 on this laptop, as the site cut it out.

The site can be browsed freely, but searching by word requires pasting your own Gemini API key.

In editing software

ComfyUI is free software where you connect blocks to generate and edit images and videos. The developer Kijai added SAM 3.1 to it in April. In the screenshot below, the block is given a video and the text "girl, pillow", and it tracks the girl and the pillows through the whole video.

Wildminder@wildmindaiHeck yes! ComfyUI getting native SAM 3.1 support. -multiplex video tracking; - text-conditioned detection of new/occluded objects; - optimized for single-GPU, no extra dependencies; - bit-packed masks, object ID overlays. thanks to Kijai! https://github.com/Comfy-Org/ComfyUI/pull/13408639332

Kongo Jun, who publishes ComfyUI tests on his blog, tried it on an RTX 4090 graphics card with an image and a short video. Processing took about 75 seconds and 23 GB of memory on the graphics card. On the video, he asked for "girl, house": both are found, and each object gets a number that lets you choose which one to cut out.

For visual effects rotoscoping, Sammie Roto Studio, an extended version of the free software Sammie-Roto 2, offers SAM 3.1. You type a word, the software suggests the objects it found, you keep the right ones, you correct the outline with clicks, then you track them forward or backward in the video.

Trying it

Meta has put the Segment Anything Playground online, where you can upload your own photos and videos. You need a Meta account to create something. The site offers ready-made templates: blur faces or license plates, pixelate screens, replace the background with a green screen, leave a trail behind a moving object. Meta says it is for personal, non-commercial use only. The tools on the page are labeled "SAM 3", but the SAM 3.1 announcement points to this same site to try it.

The home page of the Segment Anything Playground.
The home page of the Segment Anything Playground.

To build it into an application, Meta's API takes an image or a video and an object name, and returns a box and an outline for each object found. It accepts only text: clicks and boxes work only with the model installed on your own machine.

To install it, the code is on GitHub and the model is on Hugging Face, after a form that asks for your name, date of birth, country, organization and job title, followed by approval from Meta. It requires an Nvidia graphics card.

What the license allows

Matt Deitke writes that SAM 3.1 is open source. The model can indeed be downloaded for free, but under the SAM License, a license written by Meta. It allows you to use, copy, modify and redistribute the model, including in a paid product, without paying anything to Meta. Anyone who redistributes it must do so under the same license, and a scientific publication that uses it must say so.

It forbids using it for military or warfare purposes, in the nuclear industry, for espionage or for weapons, and it is closed to people and countries under US, EU, UK or UN sanctions. Anyone who sues Meta for patent or copyright infringement over the model loses their license. Meta can also change the text, and the changes apply immediately.

What it does badly

Meta acknowledges that SAM 3 does not understand long phrases such as "the second to last book from the right on the top shelf". It also does poorly at finding objects specific to a field, such as platelets in a microscope image of blood. Meta says that additional training on a few annotated images is enough to fix this second point. Meta presents SAM 3.1 as a faster version of SAM 3, with no new capability, and does not announce either limit as fixed.

The API documentation lists other limits. You need one request per type of object: "bus, bicycle" returns nothing. Negation ("person not wearing a hat") and alternatives ("cat or dog") give inconsistent results, "person on the left" is only partly respected, and a command such as "segment the bus" often returns zero results. In a video, the API tracks at most 16 objects per frame, over at most 15,000 frames, or about 10 minutes.

Tracking an object from one frame to the next can also go wrong. In his code, Jeremy Park writes that the number SAM 3.1 gives to a hold is "usually right and occasionally very wrong". So he uses the depth: a hold is bolted to the wall, so if the same hold appears more than 20 centimeters from its usual position, he rejects it. Kongo Jun got a correct outline around the person in his image, with an extra patch near the feet.

The speed gains come from Meta's measurements. On accuracy, Meta itself reports mixed results on its own video tests, with a gain on 6 of the 7 object tracking tests.

Technical sheet

SAM 3.1
API identifiersam-3.1
EndpointPOST https://api.meta.ai/v1/responses (Responses API, compatible with the OpenAI SDK)
SDKOpenAI SDK for Python and TypeScript, @meta-sam/parser to read the outlines
Inputs (API)a short object name (input_text) and an image (input_image) or an MP4 or MOV video in H.264, H.265 or MPEG-4 (input_video), by URL, base64 or Files API
Inputs (open model)text, example image, points, boxes, outlines
Outputper object: a box in pixels and an outline, stable number from frame to frame, one line per video frame, streamed or not
Outline encodinglossless by default, one_bit lighter
API limitsone concept per request, 16 tracked objects per video frame, 15,000 frames per video (about 10 min)
Rate limit3,000 requests per minute per team (Standard tier)
API price$2.50 per 1,000 images, $0.20 per 1,000 video frames
Architecturetext-guided DETR-style detector, memory-based tracking inherited from SAM 2, Object Multiplex: objects grouped in fixed-size batches and tracked together, 16 per pass
Stated speed16 → 32 frames/s on an H100 with a medium number of objects, about 7 times faster than SAM 3 at 128 objects
Published resultsMOSEv2: 60.3 → 62.3 J&F, YT-Temporal-1B: 50.8 → 52.9 cgF1
Technical documentationappendix H of the SAM 3 paper (arXiv 2511.16719)
Weightsfacebook/sam3.1 on Hugging Face, file sam3.1_multiplex.pt, access by form
InstallationPython 3.12+, PyTorch 2.7+, Nvidia card with CUDA 12.6+
LicenseSAM License: commercial use allowed, military, nuclear, espionage and weapons uses forbidden
IntegrationsMeta Model API, ComfyUI (native), VLM Run Gateway

Sources

Read the source

Up next