Guides · SAM 3 & SAM 3.1
Meta SAM Guides Step-by-step guides for every stage: get set up, write prompts that find the right objects, clean up masks, and export them to the tools you use.
Library
All Meta SAM Guides
Filter by goal or search by keyword, e.g. “ComfyUI”, “RLE” or “token”.
No-code walkthrough of the playground, prompts and downloads.
Read guide →System requirementsGPU, CUDA, Python and disk you need before installing SAM 3 or 3.1.
Read guide →Hugging Face accessRequest the gated checkpoints, create a token and log in.
Read guide →Install SAM 3Set up Python, PyTorch and the sam3 package, then run a first test.
Read guide →Download Meta SAMEvery official checkpoint, its size, access rules and checksums.
Read guide →SAM 3 promptsWrite text, point, box and example prompts that find the right objects.
Read guide →Select specific objectsPick one object among many with clicks, boxes and negative examples.
Read guide →Improve mask qualityFix rough edges, holes and leaks with refinement and better inputs.
Read guide →Background removalCut out subjects into transparent PNGs for design and e-commerce.
Read guide →Export masksSave masks as PNG, RLE, polygons or YOLO labels for other tools.
Read guide →ComfyUI setupRun SAM 3.1 in node-based ComfyUI workflows.
Read guide →Upgrade to SAM 3.1Pull the latest code, swap the checkpoint and check results.
Read guide →Python tutorial: first maskMinimal working example from install to mask.png.
Read guide →Video segmentation with PythonEnd-to-end tracking script with MP4 and CSV output.
Read guide →SAM API guideHosted APIs versus local Python interfaces.
Read guide →Mask export formatsPNG, COCO RLE, polygons, YOLO-seg and video formats explained.
Read guide →Fine-tune on a custom datasetSupported setups, dataset preparation and evaluation.
Read guide →No guides match. Try another word, or see the FAQ.
Learning paths
Learning Paths by Goal
Not sure where to begin? Follow the path that matches what you want to do.
Creator
No code: images, cut-outs, quick edits.
Developer
Run SAM 3 in your own code and apps.
Researcher / ML
Video, datasets and custom models.
Core workflow
The Workflow Every Guide Builds On
Whatever your goal, good results come from the same short loop.
- 1PromptShort noun phrase, click or box. Prompts
- 2CheckRight objects? All of them? Clean edges?
- 3RefineAdd clicks, negative examples or a tighter phrase. Mask quality
- 4ExportPNG, cut-out, RLE or polygons. Export
Troubleshooting
When Something Goes Wrong
Match the symptom to the fix.
- Install or load errors: checkpoint loading
- 401, 403 or “gated repo”: model access
- Zero masks returned: empty masks
- CUDA out of memory: OOM fixes
- Video drifts or is slow: tracking loses objects · slow tracking
- Everything else: all troubleshooting · known limitations
Questions
Guides FAQ
Where should I start with Meta SAM?
If you just want to try it, start with How to use Meta SAM and the playground. If you want to run it yourself, read System requirements, then Hugging Face access, then Install SAM 3.
Do I need to code to use these guides?
No. The prompts, selection, mask quality and background removal guides work in the playground. The developer guides are for Python users.
Do the guides cover SAM 3.1?
Yes. SAM 3.1 uses the same prompts and workflow as SAM 3; the upgrade guide covers moving to the new checkpoint and code.
Which guide helps when masks are wrong?
Start with SAM 3 prompts, then Select specific objects for the wrong object, and Improve mask quality for rough edges. The troubleshooting section covers errors.
How do I get masks into other tools?
Use Background removal for transparent PNGs, Export masks for PNG, RLE, polygons and YOLO labels, and Mask export formats for the technical details.