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.
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.
- 1Sign in to Hugging FaceCreate or log in to the account you will use for downloads.
- 2Open the model pageFor example huggingface.co/facebook/sam3.1.
- 3Submit the access formName, date of birth, country and affiliation, and accept the SAM License. Details can’t be edited after submitting.
- 4Wait for approvalOften minutes; the model page shows when access is granted.
- 5Create a tokenA Read token, or a fine-grained token with access to public gated repos.
- 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.
| Model | Hugging Face repo | Gated? | Licence |
|---|---|---|---|
| SAM 3.1 | facebook/sam3.1 | Yes | SAM License |
| SAM 3 | facebook/sam3 | Yes | SAM License |
| SAM 3D Objects | facebook/sam-3d-objects | Yes | SAM License |
| SAM 3D Body | facebook/sam-3d-body-dinov3 (and ViT-H variant) | Yes | SAM License |
| SAM Audio | facebook/sam-audio-small / -base / -large and -tv variants | Yes, each repo | SAM License |
| SAM 2 / 2.1, SAM 1 | Downloaded from Meta’s GitHub scripts and links | No | Apache 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.
- 1Log inUse the account you’ll create your token with.
- 2Open the repoe.g. huggingface.co/facebook/sam3.1.
- 3Fill in the formFirst and last name, date of birth, country, affiliation.
- 4Accept the SAM Licenseand submit. You can’t edit the form afterwards, so be accurate.
- 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.
- 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.
- Your computer:
hf auth loginstores the token for every later run. - Servers and CI: set
HF_TOKENfrom a secret; nothing is stored on disk. - Notebooks:
login()prompts without exposing the token in the cell. - Several accounts?
hf auth listandhf 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 approvedservers · 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 / ColabVerify
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.
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/sam3Python
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 checksNext: 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.
- 401 Unauthorized: no token sent. Run
hf auth loginor setHF_TOKENin 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 whoamiis 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.