Skip to content

Best PicksGPU

Best Tools for Running Segment Anything Locally in 2026

You don't need to write your own code to use Meta's Segment Anything models on your PC. We pick the best free tools for running SAM 2, SAM 3 and SAM 3.1 locally, from Meta's own repository and Ultralytics to the X-AnyLabeling desktop app, ComfyUI nodes and Label Studio.

By , Buying Guides & Peripherals Editor

5 min read

Best Tools for Running Segment Anything Locally in 2026

Our picks at a glance

  1. 1
    MSI RTX 5070 Ti 16GB Ventus 3X OC
    MSI RTX 5070 Ti 16GB Ventus 3X OC

Meta's Segment Anything models (SAM 2, SAM 3 and the newer SAM 3.1 checkpoints) can mask objects in photos and track them through video, and SAM 3 can find every object that matches a short text phrase. You don't have to write your own code to use them. Several free tools wrap the models in Python libraries, desktop labelling apps or ComfyUI nodes. We've picked the best options for different jobs using each project's official documentation. The feature details below come from their developers.

Our picks at a glance

Tool

Best for

Models supported (per developer)

Interface

Meta SAM 3 repository

Full feature set and the newest code

SAM 3, SAM 3.1

Python and notebooks

Ultralytics

Easiest Python route

SAM 3 (3.1 for images), SAM 2, SAM, MobileSAM, FastSAM

Python

X-AnyLabeling

Desktop annotation without code

SAM 1/2/3/3.1, SAM-HQ, EdgeSAM and more

Desktop app

ComfyUI-SAM3

Image and video creators using ComfyUI

SAM 3

ComfyUI nodes

Label Studio ML backend

Team image labelling projects

SAM 2

Web app plus model server

A note on access: SAM 3 and SAM 3.1 weights are gated on Hugging Face, so whichever tool you use, you'll need to request access from Meta and wait for manual approval first. SAM 2 checkpoints can be downloaded directly.

Best for the full feature set: Meta's SAM 3 repository

Meta's own GitHub repository is the reference implementation, and it gets new features first. It supports text prompts, example-box prompts, clicks and masks on images, and text-prompted tracking with click refinements on video. Example notebooks cover batched inference, SAM 3.1 video tracking and the SAM 3 Agent, which handles longer, more complex descriptions. When Meta released SAM 3.1 in March 2026, it said you need the latest repository code to use the new checkpoints.

Meta lists Python 3.12 or newer, PyTorch 2.7 or newer and a CUDA-compatible GPU with CUDA 12.6 or newer. That's a developer-oriented setup, but it's the best choice if you want every feature. Our step-by-step guide on how to run SAM 3 locally covers it. The SAM 2 repository works the same way for the older model and adds four checkpoint sizes from 38.9M to 224.4M parameters.

Best Python shortcut: Ultralytics

The Ultralytics package, best known for its YOLO detection models, has SAM 3 built in. You install it with pip install -U ultralytics and then use a SAM3SemanticPredictor for text and exemplar prompts, or the SAM3VideoPredictor and SAM3VideoSemanticPredictor classes to track objects in video by box or text prompt. Its examples include a quantize option for FP16 inference.

There are two caveats in the Ultralytics docs. Unlike its other models, SAM 3 weights aren't downloaded automatically, so you have to fetch sam3.pt yourself once Meta has approved your access. And the SAM 3.1 checkpoint is supported for image prediction only for now; Object Multiplex video tracking isn't supported yet, so keep using sam3.pt for video. Ultralytics' model docs also cover SAM 2, the original SAM, MobileSAM and FastSAM, which is handy if you want to compare models with the same code.

Best desktop app: X-AnyLabeling

X-AnyLabeling is a free, GPL-3.0-licensed desktop annotation tool that describes itself as cross-platform. It's the most complete no-code option here. Its model list includes SAM 1, 2, 3 and 3.1, plus SAM-HQ, SAM-Med2D, EdgeSAM and EfficientViT-SAM, along with YOLO detectors, OCR, depth estimation and vision language models. In November 2026 the developers added SAM 3.1 Video support, with text-prompted multi-object tracking and interactive point segmentation.

It can run models locally through engines including ONNX Runtime and TensorRT, or connect to remote inference servers, and it imports and exports common dataset formats such as COCO, VOC, YOLO and MASK. That makes it a strong choice if you're building a training dataset for your own detector, or for a project such as Frigate local AI object detection.

Best for ComfyUI users: ComfyUI-SAM3

ComfyUI-SAM3 is a community custom-node pack that brings SAM 3's open-vocabulary image and video segmentation, using natural-language text prompts, into ComfyUI. It also includes a SAM3PointsEditor node for point-based segmentation, adapted from kijai's KJNodes. That's useful for masking a subject before inpainting, relighting or upscaling, alongside workflows such as SeedVR2 video upscaling in ComfyUI.

The developer recommends installing through ComfyUI Manager by searching for SAM3, with a Git URL or manual install as fallbacks. The README warns that the one-click installer uses an experimental package that downloads the pixi package manager, so if you'd rather keep your setup tidy, use the manual install. Make sure ComfyUI is current first: see how to update ComfyUI.

Best for team labelling: Label Studio with the SAM 2 ML backend

Label Studio is a web-based data labelling platform, and its documentation includes a tutorial for connecting SAM 2 through the Label Studio ML backend. You run SAM 2 as a model server, set the model configuration and checkpoint (SAM 2 Large by default), then link it to a labelling project so annotators get model-assisted masks. Label Studio's documentation says SAM 2 runs only on a GPU, and that CUDA is currently the only supported device for the model server.

It's more setup than a desktop app, but it suits teams who need several people working on the same dataset. The tutorial covers SAM 2 rather than SAM 3.

Also consider: CVAT

CVAT offers a SAM 2 tracker that follows existing polygons and masks forward through video frames. The AI agent version runs the model on your own hardware via Docker and works with CVAT Online and Enterprise, with an Nvidia GPU optional for faster inference. You still need a CVAT account or Enterprise instance, so it isn't fully self-contained.

What hardware do you need?

None of these projects publishes a minimum VRAM figure. Meta's SAM 3 instructions list a CUDA-compatible Nvidia GPU, and the Label Studio SAM 2 backend is GPU-only, so an Nvidia card is the safest choice. We'd suggest a 16GB card such as the MSI RTX 5070 Ti 16GB Ventus 3X OC for comfortable SAM 3 video work, though SAM 2.1's smaller checkpoints run on much more modest cards. These are our suggestions, not developer requirements. Our guide to the best Nvidia graphics cards for local AI has more options.

If you only want to remove the background from a photo, a dedicated app is simpler: see our pick of the best AI background remover apps for PC.

The bottom line

For most people who want Segment Anything on their own PC without coding, X-AnyLabeling is the best place to start: it's free, supports SAM 1 through SAM 3.1 and recently added SAM 3.1 video tracking. Python users should try Ultralytics for the quickest SAM 3 setup, and use Meta's own repository for the full feature set. ComfyUI users can add SAM 3 masking with ComfyUI-SAM3, while teams labelling datasets together should look at Label Studio. Whichever you choose, request access to Meta's gated SAM 3 weights first.

Sources

  1. 01Meta, SAM 3 GitHub repository and README
  2. 02Meta, SAM 3.1 release notes
  3. 03Meta, SAM 2 GitHub repository and README
  4. 04Meta, SAM 3 model card on Hugging Face
  5. 05Ultralytics, SAM 3 documentation
  6. 06CVHub520, X-AnyLabeling GitHub repository
  7. 07PozzettiAndrea, ComfyUI-SAM3 GitHub repository
  8. 08Label Studio, Using SAM2 with Label Studio for Image Annotation
  9. 09CVAT, Segment Anything 2 Tracker documentation

About the author

Hannah Vance

Buying Guides & Peripherals Editor

Hannah edits Forge PC's buying guides and component roundups across gaming monitors, mechanical keyboards, mice, cases and power supplies. She specialises in OLED and Mini-LED panel characteristics, low-latency wireless peripherals, acoustic damping and value-for-money component selection for UK PC builders.

More from Hannah Vance

Read next

SAM 2 vs SAM 3: Which Segment Anything Model Should You Run Locally?

Versus

SAM 2 vs SAM 3: Which Segment Anything Model Should You Run Locally?

SAM 3 adds text-prompted segmentation of every matching object, but SAM 2.1 is smaller, comes in four sizes and has a simpler licence. We compare prompts, size, Meta's speed and accuracy figures, hardware needs and licences to help you pick the right Segment Anything model.

Callum Reid5 min

How to Run Meta's SAM 3 Locally on Your Own GPU

How-To

How to Run Meta's SAM 3 Locally on Your Own GPU

Meta's SAM 3 can find, cut out and track every object matching a short text phrase in your photos and videos. Using Meta's official GitHub instructions and model card, we show how to get access to the weights, install it on an Nvidia GPU and run your first image and video prompts.

Marcus Thorne5 min

How to Use Special K: Frame Limiter, HDR Retrofit and More

How-To

How to Use Special K: Frame Limiter, HDR Retrofit and More

Special K is a free, open-source tool that adds a frame limiter, HDR retrofit, better borderless windows and NVIDIA Reflex to PC games. We explain how to install it, launch games through SKIF, use the frame limiter and HDR calibration, and avoid anti-cheat and compatibility problems, using the official wiki.

Marcus Thorne6 min