SAM3.1 for Image and Video Segmentation
Segment and track any object in images and video with SAM 3.1, Meta's concept segmentation model. Type what you want, hit run, and get clean masks back.
Image to Image
SAM 3.1
Segmentation
Video to Video
0
46
Nodes & Models
LoadImage
CheckpointLoaderSimple
sam3.1_multiplex_fp16.safetensors
CLIPTextEncode
SAM3_Detect
SAM3_VideoTrack
DrawBBoxes
SAM3_TrackToMask
SAM3_TrackPreview
ImageFromBatch
MaskToImage
PreviewImage
InvertMask
VHS_LoadVideo
VHS_VideoInfoLoaded
VHS_VideoCombine
MaskPreview+
ABOUT THE WORKFLOW
Segment Anything by Text
Upload an image or a video, type a short phrase for what you want to pull out, and the model finds every matching object and draws a precise mask around it. On an image you get the masks plus a bounding-box preview. On a video it follows those objects across every frame and returns a masked video.
Model
SAM 3.1 by Meta. The third Segment Anything model, built for promptable concept segmentation. It detects, segments, and tracks every instance of an object you describe in plain text, across both images and video.
HOW IT WORKS
Step 1. Upload your image or video
Drop in a photo to segment a single frame, or a clip to track objects through the whole thing.
Works great with: photos · product shots · footage · interviews
Step 2. Describe what to segment
Type a short noun phrase for the thing you want, like "the blue boat" or "2 hands from a man." The model masks every object that matches.
Step 3. Set the detection threshold (optional)
The threshold controls how confident the model has to be before it keeps a detection. Default is 0.5, which suits most clips.
Step 4. Pick which tracked objects to keep (optional)
For video, each tracked object gets an ID. List the IDs you want as a comma-separated set, like "0,12," to keep only those in the final mask.
Step 5. Hit run and download
For an image you get the masks and a bounding-box preview. For a video you get a masked clip you can take into editing or compositing.
Ready for: After Effects · Nuke · Premiere · DaVinci Resolve
First time? Leave every setting as-is. The defaults are the right starting point for almost everyone.
RECOMMENDED SETTINGS
Quick-start guide. Find the goal that matches yours and copy the settings.
Standard use (most people). Threshold 0.5, one text prompt, defaults everywhere else. The right starting point for almost everyone.
Catching more instances. Lower the threshold below 0.5 when the model is missing objects it should be finding. The tradeoff is more false positives to clean up.
Cutting false positives. Raise the threshold above 0.5 when it is masking things you did not ask for. Fewer stray masks, but you may lose a faint match.
Tracking one object through a clip. Keep a single ID in the track-to-mask list. The model locks onto that object and follows it frame to frame.
Keeping several objects. List each ID comma-separated, like "0,12." Every listed object stays in the final mask, the rest drop out.
Cutting out the subject instead of the background. The video path inverts the mask by default, so the background is masked. Flip the invert step to keep the subject and drop the background.
Prompt: Use a short, concrete noun phrase for the thing itself. "Red car," "the blue boat," or "players in white jerseys" works better than a full sentence. Keep it to the object and a defining feature. Long descriptive prompts make the match less precise.
LEARN
📹 Videos
ComfyUI 101 Free Course ft. Sebastian Kamph
Floyo 101 for Team Collaboration
✨ Quick links
USE CASES
🎬 VFX & Rotoscoping
Pull a clean matte of a person or object across a whole clip from one text prompt, instead of rotoscoping by hand.
🛍️ Product & E-commerce
Isolate a product from its background in seconds, ready for a clean cut-out or a new backdrop.
🎯 Dataset Labeling
Generate segmentation masks for every instance of a class to build or expand a training set.
🎨 Compositing
Produce per-object masks for green-screen-free comps, then take the alpha straight into your editor.
🔍 Object Tracking
Name an object once and follow it through every frame, with a separate mask for each thing you track.
WHAT WORKS BEST / WHAT TO AVOID
✅ Works great
Clear, well-lit subjects against a readable background
Short concrete prompts like "red car" or "the blue boat"
Objects that stay visible through the clip
Distinct objects you can name in a few words
⚠️ May produce softer results
Heavy motion blur or low light
Vague prompts like "the thing on the left"
Objects that leave the frame and return often
Dense crowds where instances overlap heavily
FAQ
What is SAM 3.1?
SAM 3.1 is Meta's Segment Anything Model 3, the third model in the Segment Anything series. It detects, segments, and tracks objects in images and video from a text or visual prompt. The 3.1 release adds faster, more accessible real-time video detection and tracking.
How is SAM 3 different from SAM 2?
SAM 2 segmented one object per prompt and needed clicks or boxes to point at it. SAM 3 works at the concept level: give it a short phrase like "shipping container" and it masks every matching object at once, each with its own ID. It still keeps the click and box prompting from SAM 2.
Can SAM 3.1 segment objects from a text prompt?
Yes. This is the core feature, called promptable concept segmentation. You type a short noun phrase and the model finds and masks every object that matches, across an image or a video clip. No clicking or boxing required to get started.
Does SAM 3.1 work on video?
Yes. Give it a video and it tracks every identified object through the frames, giving each one a consistent ID. This workflow takes that track and turns it into a masked video you can take into editing or compositing.
What is promptable concept segmentation?
It means segmenting by meaning rather than by clicking. Instead of "mask this exact thing I clicked," you describe a concept like "yellow school bus" and the model returns a separate mask for every instance of that concept in the scene.
Can I use SAM 3.1 results commercially?
SAM 3 is released by Meta under the SAM License rather than a standard open-source license. Commercial use is generally allowed under Meta's terms, but review the current SAM License before shipping, and make sure you hold the rights to any image or video you upload.
How to run SAM 3.1 online?
You can run SAM 3.1 online through Floyo. No installation, no setup, no API key to wire up. Open the workflow in your browser, upload your inputs, and hit run. Free to try.
WHY FLOYO?
Floyo is the only platform with team collaboration for ComfyUI in the browser. You run workflows with no install. You share run history, assets, and models across your team. You pay only when you generate. Floyo supports open-source and closed-source models.
An artist masks a shot and likes the result. A teammate opens that exact run from shared history and keeps going. No file handoffs. No version confusion.
For studios and enterprise teams, Floyo adds private workspaces, pooled resources, and a team usage dashboard. Other ComfyUI cloud tools run for one person at a time. Floyo runs for the whole team, with transparent per-generation costs.
Ready to try it?
Upload an image or a clip, type what you want to segment, and run it. The settings are already set.
Questions? Watch the free course or check the FAQ above.
A few notes on choices I made, since they affect accuracy:
No partner-node block. The workflow loads a local checkpoint (
sam3.1_multiplex_fp16.safetensors), so it is not a paid external API call.I described the first SAM3_Detect widget (
0.5) as a detection/confidence threshold, which fits SAM 3's scoring behavior, and the TrackToMask"0,12"value as the object-ID list. Those are the two settings worth exposing; the rest are internal plumbing.The video output runs through an invert step before compositing, so by default the background is masked. I called that out in RECOMMENDED SETTINGS so the page matches what the workflow actually returns.
If you'd like, I can also generate the sticky-note nodes block for this workflow using the same JSON.
Read more














