Meta SAM 3 Playground

Guide · gated checkpoints · SAM 3 / 3.1 / 3D / Audio

How to Request SAM Model Access on Hugging Face Meta’s newest SAM checkpoints are gated. Here’s how to request access, authenticate your machine with the right token, and download the checkpoints, plus how to fix the 401 and 403 errors that trip most people up.

gated access
Animation of the gated access flowA padlock on the facebook/sam3.1 checkpoint opens as four stages light up: submit the request form, get approved, create a token, and download the checkpoint, which then fills a progress bar. facebook/sam3.1 requestform + licenceapprovedper repotokenRead / fine-graineddownloadhf download sam3.1_multiplex.pt~3.5 GB one request per repository · same account for request, token and download
Illustration: request, approval, token, download.

Overview

The Whole Process in Six Steps

Three parts: get approved, prove who you are, then download. Use the same Hugging Face account for all three.

  1. 1Sign in to Hugging FaceCreate or log in to the account you will use for downloads.
  2. 2Open the model pageFor example huggingface.co/facebook/sam3.1.
  3. 3Submit the access formName, date of birth, country and affiliation, and accept the SAM License. Details can’t be edited after submitting.
  4. 4Wait for approvalOften minutes; the model page shows when access is granted.
  5. 5Create a tokenA Read token, or a fine-grained token with access to public gated repos.
  6. 6Log in and downloadhf auth login, then hf download facebook/sam3.1.

Which repos are gated

Which SAM Models Need an Access Request?

Approval is per repository. Request only what you need, but remember each needs its own approval.

ModelHugging Face repoGated?Licence
SAM 3.1facebook/sam3.1YesSAM License
SAM 3facebook/sam3YesSAM License
SAM 3D Objectsfacebook/sam-3d-objectsYesSAM License
SAM 3D Bodyfacebook/sam-3d-body-dinov3 (and ViT-H variant)YesSAM License
SAM Audiofacebook/sam-audio-small / -base / -large and -tv variantsYes, each repoSAM License
SAM 2 / 2.1, SAM 1Downloaded from Meta’s GitHub scripts and linksNoApache 2.0

Sizes and direct commands for every model: download guide

Part 1 · Access request

Submit the Access Request

On each model page you’ll see a short form instead of the files. Fill it in once per repo.

access form
Animation of filling in the access request formA form fills in field by field with sample details: first name, last name, date of birth, country and affiliation. A licence checkbox is ticked and the Submit button is pressed. A note warns that the form can’t be edited after submission. First NameJaneLast NameDoeDate of birth1990-12-10CountrySri LankaAffiliationAcme Robotics I accept the SAM License Submit use accurate details · can’t edit after submit
Illustration with sample details.
Access request
  1. 1Log inUse the account you’ll create your token with.
  2. 2Open the repoe.g. huggingface.co/facebook/sam3.1.
  3. 3Fill in the formFirst and last name, date of birth, country, affiliation.
  4. 4Accept the SAM Licenseand submit. You can’t edit the form afterwards, so be accurate.
  5. 5Check statusReload the model page: the file list appears once you’re approved.

Approval is often quick but not guaranteed. Requests from comprehensively sanctioned jurisdictions are rejected. Licence summary: terms (not legal advice).

Part 2 · Authentication

Create the Right Token

Approval is tied to your account; the token proves it’s you. The wrong token type is the #1 cause of 403 errors.

Read vs fine-grained
Animated comparison of token typesTwo token cards. A Read token can download any gated repo your account has been approved for. A fine-grained token can only do so if the box “Read access to contents of all public gated repos you can access” is ticked; the animation ticks that box and the download arrow turns from red to green. Read token simplest choicereads everything youraccount can access ✓ gated download Fine-grained safer, but must enable: Read access to contentsof all public gated reposyou can access not enabled by default ✗ 403 Forbidden ✓ gated download
Illustration of token permissions.
Authentication
  • Where: Hugging Face → Settings → Access Tokens → Create new token.
  • Easiest: a Read token. It can download every gated repo your account is approved for.
  • Fine-grained: tick “Read access to contents of all public gated repos you can access”. It is off by default.
  • Name and expire it: e.g. “sam3-workstation”; set an expiry for shared machines.
  • Keep it secret: never paste it into code, notebooks you share, or Git.

Part 2 · Authentication

Authenticate Your Machine

Pick the method that fits where SAM 3 will run.

authentication methods
Animated diagram of authentication methodsThree ways to authenticate flow into the Hugging Face Hub: the hf auth login command on a laptop, the HF_TOKEN environment variable on servers and in CI, and login() in Python notebooks. The Hub checks the token and the account’s approval before allowing the download. hf auth loginlaptop · browser or pasteHF_TOKEN=…servers · CI · Dockerlogin() in Pythonnotebooks · Colab Hugging Face Hub1 · valid token?2 · account approved?
Illustration of the three ways to authenticate.
  • Your computer: hf auth login stores the token for every later run.
  • Servers and CI: set HF_TOKEN from a secret; nothing is stored on disk.
  • Notebooks: login() prompts without exposing the token in the cell.
  • Several accounts? hf auth list and hf auth switch.

your computer

pip install -U huggingface_hub          # provides the 'hf' command

hf auth login                           # opens a browser, or paste a token
hf auth whoami                          # must be the account Meta approved

servers · CI · Docker

# servers, CI, Docker: no interactive login
export HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxx  # from a secret store, never committed
hf auth whoami

# or save it non-interactively
hf auth login --token "$HF_TOKEN"

notebooks

from huggingface_hub import login
login()          # prompts for the token in notebooks / Colab

Verify

Check Which SAM Repos You Can Access

Before downloading gigabytes, confirm login and approval for each repo in one go.

check_access.py

from huggingface_hub import auth_check, whoami

REPOS = ["facebook/sam3", "facebook/sam3.1", "facebook/sam-3d-objects",
         "facebook/sam-3d-body-dinov3", "facebook/sam-audio-large"]

try:
    print("logged in as:", whoami()["name"])
except Exception as e:
    raise SystemExit(f"not logged in ({type(e).__name__}): run  hf auth login")

for repo in REPOS:
    try:
        auth_check(repo)
        print(f"OK   {repo}")
    except Exception as e:
        print(f"NO   {repo}  ({type(e).__name__})")

example output

$ python check_access.py
logged in as: jane-doe
OK   facebook/sam3
OK   facebook/sam3.1
NO   facebook/sam-3d-objects  (GatedRepoError)
NO   facebook/sam-3d-body-dinov3  (GatedRepoError)
NO   facebook/sam-audio-large  (GatedRepoError)

auth_check is part of huggingface_hub; update the package if the import fails.

Part 3 · Checkpoint download

Download the Checkpoints

Once approved and logged in, any of these routes works. Downloads resume if interrupted.

Checkpoint download

command line

# whole repo into a folder you choose
hf download facebook/sam3.1 --local-dir checkpoints/sam3.1

# just one file
hf download facebook/sam3 sam3.pt --local-dir checkpoints/sam3

# into the shared cache (the sam3 package finds it automatically)
hf download facebook/sam3

Python

from huggingface_hub import hf_hub_download, snapshot_download

ckpt = hf_hub_download("facebook/sam3", "sam3.pt")   # one file → cache path
folder = snapshot_download("facebook/sam3.1")                # whole repo
print(ckpt, folder)

automatic, on first use

# or let SAM 3 fetch it on first use (uses your login)
from sam3.model_builder import build_sam3_image_model
model = build_sam3_image_model()

verify and reuse

ls -lh ~/.cache/huggingface/hub/                    # default cache; move it with HF_HOME
sha256sum checkpoints/sam3/sam3.pt
# expected for facebook/sam3 sam3.pt:
# 9999e2341ceef5e136daa386eecb55cb414446a00ac2b55eb2dfd2f7c3cf8c9e

export HF_HUB_OFFLINE=1                            # reuse the cache without network checks

Next: install SAM 3 · first mask in Python · Ultralytics and ComfyUI need the file in a known folder, so use --local-dir.

Troubleshooting

Fix Access Errors

Read the status code first; it tells you which step failed.

error decoder
Animated error decoderFour common outcomes appear in turn with their fixes: 401 means not logged in or token not sent; 403 means the token lacks gated read permission or belongs to the wrong account; awaiting review means wait; rejected means use a hosted API instead. 401not logged in / token not sent→ hf auth login · check HF_TOKEN403token lacks gated read, or wrong account→ Read token · whoami“awaiting review”request pending→ wait; check model pagerejectedform or location policy→ hosted API instead
Illustration of common access errors.
  • 401 Unauthorized: no token sent. Run hf auth login or set HF_TOKEN in the same shell or container.
  • 403 Forbidden: the token can’t read this gated repo. Use a Read token or enable gated-repo read on your fine-grained token, and confirm hf auth whoami is the approved account.
  • Works on laptop, fails in Docker or CI: the token wasn’t passed into that environment.
  • Approved for sam3, not sam3.1: request sam3.1 separately.
  • Rejected: use the playground or a hosted API.
  • More: model access troubleshooting

Questions

Hugging Face Access FAQ

Why are SAM 3 checkpoints gated?

Meta releases SAM 3, SAM 3.1, SAM 3D and SAM Audio under the SAM License and asks each user to submit a short form and accept the licence on Hugging Face before downloading.

How long does SAM access approval take?

Often minutes, but it isn’t guaranteed. Requests can be refused, including from comprehensively sanctioned jurisdictions.

Do I need separate access for SAM 3.1?

Yes. Each repository is gated separately: facebook/sam3, facebook/sam3.1, the SAM 3D repos and each SAM Audio repo need their own approval.

Which token type should I use?

A Read token is simplest. If you use a fine-grained token, enable read access to the public gated repos you can access; it is not on by default and its absence causes 403 errors.

Why do I get a 401 or 403 error after approval?

Usually the token belongs to a different account, isn’t being sent, or is a fine-grained token without gated-repo read permission. Run hf auth whoami and check the token settings.

Can I share my downloaded SAM checkpoint with my team?

Each person should request their own access, since the licence is accepted per user. If you redistribute, you must pass on the SAM License terms. This is not legal advice.

Can I download SAM on a server without a browser?

Yes. Set the HF_TOKEN environment variable to your token, or run hf auth login --token, then use hf download.

Keep reading