Guide · SAM 3 / 3.1 · hardware & software
Meta SAM Hardware and Software Requirements Meta’s official requirements, the GPU configurations people have actually published, how much VRAM each workload needs, and a script that checks your machine in seconds.
At a glance
SAM 3 / 3.1 Requirements at a Glance
Minimum gets it running; recommended keeps it comfortable.
| Item | Minimum (official) | Recommended |
|---|---|---|
| Operating system | Linux (Windows via WSL2) | Ubuntu 22.04 or newer |
| Python | 3.12 | 3.12 in a fresh conda env |
| PyTorch | 2.7 | Version in the current README (2.10.0, CUDA 12.8 build) |
| CUDA | 12.6 | 12.8 via the PyTorch wheel |
| GPU | CUDA-capable NVIDIA GPU | 16 GB+ for images, 24 GB+ for video |
| Disk | ~4 GB per checkpoint | 20 GB+ free for packages, cache and outputs |
| Access | Approved facebook/sam3 / sam3.1 | Token set up with hf auth login |
VRAM and disk recommendations are our guidance based on published reports, not Meta minimums.
Official requirements
Official Requirements by Model
As published in each model’s official repository or model card.
| Model | Python | PyTorch / CUDA | Hardware & OS | Notes |
|---|---|---|---|---|
| SAM 3 / SAM 3.1 | 3.12+ | PyTorch 2.7+; CUDA 12.6+ | CUDA-compatible NVIDIA GPU | 3.1 needs the latest repo code; optional Flash Attention 3 and cc_torch for speed |
| SAM 2 / 2.1 | 3.10+ | torch 2.5.1+, torchvision 0.20.1+ | GPU recommended; Windows via WSL | Sizes from 38.9M to 224.4M parameters |
| SAM 1 | 3.8+ | torch 1.7+, torchvision 0.8+ | GPU recommended | Legacy; Apache 2.0 |
| SAM 3D Objects | Per repo env file | Per repo (conda/mamba env) | 64-bit Linux; NVIDIA GPU with 32 GB+ VRAM | Gated checkpoints |
| SAM 3D Body | Per INSTALL.md | Per INSTALL.md | NVIDIA GPU | Can use SAM 3 as the detector |
| SAM Audio | 3.11+ | PyTorch (CUDA recommended) | GPU strongly recommended | Small, base, large and -tv variants |
| Ultralytics SAM 3 wrapper | Per Ultralytics | PyTorch | GPU, or CPU/Apple Silicon for tests | ultralytics 8.3.237+ |
Related: downloads and file sizes · all models
Software stack
The Software Stack, Bottom to Top
Each layer must match the one below it. Most install failures are a version mismatch.
- Driver first: install a recent NVIDIA driver; you don’t need a separate CUDA toolkit, because the PyTorch wheel bundles CUDA.
- Match PyTorch to CUDA: the README’s current command installs
torch==2.10.0from thecu128index; older docs used 2.7.0 withcu126. - Fresh environment: a new conda env with Python 3.12 avoids clashes with other projects.
- Optional speed-ups:
flash-attn-3andcc_torch, both from the README.
Full steps: install SAM 3 · Quick checks: check your machine
VRAM
How Much GPU Memory You Need
Memory depends far more on the job than on the model: image vs video, resolution, clip length and object count.
- Images: reports range from ~2 GB for an FP16 export to 4–12 GB with the standard code. A 12–16 GB card is a safe start.
- Short videos: one guide reports ~18–25 GB for a short single-object clip; memory grows with frames and objects.
- Long, high-res video: a cloud deployment guide sizes a 30-minute 1080p clip with 3 tracks at ~55 GB.
- Cut memory: lower resolution, shorter clips, fewer objects, FP16, and streaming outputs to disk. OOM fixes
Tested configurations
Published and Tested Configurations
Real hardware that Meta and others have reported running SAM. We list who reported each result; we did not re-run these benchmarks.
| Hardware | Model / workload | Reported result | Reported by |
|---|---|---|---|
| NVIDIA H200 | SAM 3 · single image | ~30 ms per image with 100+ objects | Meta |
| NVIDIA H100 | SAM 3.1 · video, medium object counts | 16 → 32 FPS vs SAM 3; ~7× faster at 128 objects | Meta |
| NVIDIA A100 | SAM 2.1 · video | 91.2 FPS (Tiny) to 39.5 FPS (Large) | Meta (sam2 README) |
| NVIDIA RTX 6000 (48 GB), Ubuntu | SAM 3 · video via Gradio | Ran smoothly; VRAM suggested mid-range GPUs can cope | Independent blog |
| RTX 5090 / RTX 4090 | SAM 3 · image + video demo notebook | 5090 default; 4090 minimum | HyperAI tutorial |
| RTX 4090 vs 3090 | SAM 3 · video | 4090 ~2–3× faster for the same VRAM | Apatero guide |
| RTX 5060 Ti (16 GB) | SAM 3 · FP16 portable export, 1080×1920 image | 1.9 GiB peak allocated | fastforks model card |
| RTX 3060-class | SAM 3 · images (WSL Ubuntu) | ~4–6 GB VRAM; 1–5 s per image | RobotExchange tutorial |
| Ubuntu 22.04+ / WSL2 | SAM 3 · local install | ~10–12 GB idle for images; ~18–25 GB short video | Codersera guide |
| AMD Ryzen AI Max+ 395 | SAM 3 · local | Ran locally with fast inference | Community post |
| iPhone 15 Pro Max | EdgeTAM (SAM 2-style, not SAM 3) | 16 FPS on device | EdgeTAM authors |
Results depend on code version, precision, resolution and settings, so treat them as orientation, not guarantees.
Platforms
Operating System Support
SAM 3 is developed and tested on Linux with NVIDIA GPUs.
- Linux: the reference platform; Ubuntu 22.04+ is widely used.
- Windows: install WSL2 with Ubuntu and the NVIDIA WSL driver, then follow the Linux steps.
- macOS: no CUDA. Use the Ultralytics wrapper or a community CPU build for testing, or a hosted API.
- Cloud: rent an A100, H100 or L40S for big video or fine-tuning jobs.
- No GPU at all: playground or hosted APIs.
Choose hardware
Which Hardware Fits Your Work?
Use the playground or a hosted API; local runs are for testing only.
RTX 3060 12 GB, 4060 Ti 16 GB, 5060 Ti 16 GB: single images and light batches.
RTX 3090, 4090, 5090: interactive video and moderate batches.
RTX 6000, L40S, A100, H100, H200: long clips, many objects, fine-tuning, SAM 3D.
These tiers are our guidance from the reports above. For training, see fine-tuning; for video, use SAM 3.1.
Check your machine
Check Your Machine in 10 Seconds
Save and run this script in the environment you plan to use. It checks every requirement above.
quick check
nvidia-smi # driver version, GPU, free memory
python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available())"check_env.py
import platform, shutil, sys
def row(name, value, ok):
print(f"{'OK ' if ok else 'FIX '} {name:<13} {value}")
def ver(s, n=2):
return tuple(int(x) for x in s.split("+")[0].split(".")[:n])
row("Python", platform.python_version(), sys.version_info >= (3, 12))
row("OS", f"{platform.system()} {platform.release()}", platform.system() == "Linux")
try:
import torch
row("PyTorch", torch.__version__, ver(torch.__version__) >= (2, 7))
cuda = torch.version.cuda or "none (CPU build)"
row("CUDA (torch)", cuda, torch.version.cuda is not None and ver(cuda) >= (12, 6))
if torch.cuda.is_available():
p = torch.cuda.get_device_properties(0)
gb = p.total_memory / 1024**3
row("GPU", f"{p.name} · {gb:.0f} GB (16+ GB recommended)", gb >= 16)
else:
row("GPU", "no CUDA GPU visible", False)
except ImportError:
row("PyTorch", "not installed", False)
free = shutil.disk_usage(".").free / 1024**3
row("Free disk", f"{free:.0f} GB (20+ GB recommended)", free >= 20)
try:
import sam3 # noqa: F401
row("sam3 package", "installed", True)
except ImportError:
row("sam3 package", "not installed", False)example output
$ python check_env.py
OK Python 3.12.7
OK OS Linux 6.8.0-49-generic
OK PyTorch 2.10.0+cu128
OK CUDA (torch) 12.8
OK GPU NVIDIA GeForce RTX 4090 · 24 GB (16+ GB recommended)
OK Free disk 212 GB (20+ GB recommended)
OK sam3 package installedTroubleshooting
Requirement Problems and Fixes
| Problem | Cause | Fix |
|---|---|---|
torch.cuda.is_available() is False | CPU-only PyTorch, or driver too old | Reinstall PyTorch from the CUDA index URL; update the NVIDIA driver |
| Syntax or typing errors on import | Python older than 3.12 | Create a new env with Python 3.12 |
| CUDA out of memory | Job too large for the GPU | Lower resolution, fewer objects, shorter clips. OOM guide |
| Very slow video | Small GPU, many objects | Use SAM 3.1; reduce resolution. Slow tracking |
| GPU not visible in WSL | Missing WSL GPU driver | Install the NVIDIA driver for WSL on Windows; don’t install a Linux driver inside WSL |
Questions
Requirements FAQ
What are the official SAM 3 requirements?
Meta lists Python 3.12 or higher, PyTorch 2.7 or higher, and a CUDA-compatible GPU with CUDA 12.6 or higher. The current install example uses PyTorch 2.10.0 built for CUDA 12.8.
How much VRAM does SAM 3 need?
For single images, published reports range from about 2 GB (an FP16 export) to 4–12 GB with the standard code. Video needs much more and grows with clip length, resolution and object count; plan on 24 GB or more for comfortable video work.
Can I run SAM 3 on an RTX 3060 or 4060?
For images, usually yes: a modern NVIDIA card such as an RTX 3060 is reported as a comfortable baseline, at roughly 1–5 seconds per image. For long or crowded videos, a 24 GB card or a cloud GPU is more practical.
Does SAM 3 run on Windows or Mac?
The official code is developed on Linux. Windows users should use WSL2 with an NVIDIA GPU. On Mac, there is no CUDA, so use the Ultralytics wrapper or a community CPU build for testing, or a hosted API for real work.
Can SAM 3 run on CPU?
Only slowly, through community wrappers. Meta’s official setup expects a CUDA GPU.
What do SAM 3D and SAM Audio need?
SAM 3D Objects needs 64-bit Linux and an NVIDIA GPU with at least 32 GB of VRAM. SAM Audio needs Python 3.11 or newer and a GPU is strongly recommended.
How do I check if my machine is ready?
Run the check_env.py script on this page. It reports your Python, PyTorch, CUDA, GPU memory, free disk and whether the sam3 package is installed.