TLDR:
- I want to use the “pyannote/speaker-diarization-3.1” model.
- I’ve set up an account and gotten authorization to use the model, confirmed by the model page and my API token page.
- The API token I’m using is full “READ”
- I’ve triple-checked everything’s right on my end, cleared caches, regenerated tokens, etc
- The huggingface site stubbornly refuses to let me access the model.
It’s probably some “gotcha” someone else on the forum could help me sort-out in 3 sentences …but darn-it, I need to get my Holiday Karaoke on (using this model).
![]()
Since I’ve already burned three hours debugging this, here’s the whole thing written up as a formal bug report. If there’s actually a bug, maybe it’ll help.
Gated model access “Accepted” in UI. Token valid. API metadata accessible. Endpoint
/resolve/*incorrectly returns403 GatedRepoon [pyannote/speaker-diarization-3.1]
Summary
I have accepted access to the gated model pyannote/speaker-diarization-3.1 (Requested via UI; Granted), and I’m using a valid READ token (verified using whoami).
Despite this:
- huggingface API metadata for the model is accessible using my token:
[GET /api/models/...]returns JSON successfully) - But file resolution via the
[/resolve/main/...]endpoint returns a403 Forbiddenwithx-error-code: GatedRepo- and the response text “not in authorized list”.
This happens using both :
curlwith theAuthorization: Bearer <token>header and withhuggingface_hub.hf_hub_download [..., token=<token>]with explicit token passed in code.
Now …this strongly suggests some sort of server-side entitlement / gating issue between huggingface’s metadata APIs and resolver/download endpoints (as opposed to “something’s wrong on my end”).
My Environment
- OS: macOS Catalina 10.15.7 (x86_64) - Yes I need to upgrade (OpenCore for the win)

- Python: 3.9.6 (
/usr/local/bin/python3) huggingface_hub: installed via pip- Token: READ token (not fine-grained)
- Account: username
mischivus(and yes, my email is verified)
Expected behavior
I’d generally expect that once access is marked as Accepted in the site UI for [pyannote/speaker-diarization-3.1], and three hours have passed …that authenticated requests with a valid token should allow downloading repository files such as:
https://huggingface.co/pyannote/speaker-diarization-3.1/resolve/main/config.yaml
…using hf_hub_download.
Actual behavior
The model page and gated-repo settings show access as Accepted, but /resolve/... returns:
- HTTP 403
x-error-code: GatedRepox-error-message: Access to model pyannote/speaker-diarization—3.1 is restricted and you are not in the authorized list. Visit https://huggingface.co/pyannote/speaker-diarization-3.1 to ask for access.
Evidence: Access status in UI
From:
https://huggingface.co/settings/gated-repos
Accepted entries include:
pyannote/segmentationpyannote/speaker-diarization-3.0pyannote/speaker-diarization-3.1
Additionally:
- I explicitly requested access to
pyannote/speaker-diarization-3.1via the model page, and the UI indicates it was granted.
Reproduction steps
Step 1 — Verify token is valid and maps to my account
printf "Paste HF token (hidden): " && read -r -s HF_TOKEN && echo \
&& curl -sS -H "Authorization: Bearer ${HF_TOKEN}" \
"https://huggingface.co/api/whoami-v2"
Output (truncated)
{"type":"user","id":"[REDACTED]","name":"mischivus","fullname":"[REDACTED]","email":"[REDACTED}@[REDACTED].com","emailVerified":true,...}
So the token is valid and authenticates successfully.
Step 2 — Confirm the model’s metadata is accessible via authenticated API
printf "Paste HF token (hidden): " && read -r -s HF_TOKEN && echo \
&& curl -sS -H "Authorization: Bearer ${HF_TOKEN}" \
"https://huggingface.co/api/models/pyannote/speaker-diarization-3.1" \
| python3 -m json.tool | sed -n '1,200p'
Output highlights:
"id": "pyannote/speaker-diarization—3.1”"gated": "auto"siblingsincludes"config.yaml"
So the API acknowledges the repo and lists the file.
Step 3 — Attempt to download config.yaml via /resolve/ with curl (fails)
printf "Paste HF token (hidden): " && read -r -s HF_TOKEN && echo \
&& curl -sS -D- -o /dev/null \
-H "Authorization: Bearer ${HF_TOKEN}" \
"https://huggingface.co/pyannote/speaker-diarization-3.1/resolve/main/config.yaml" \
| sed -n '1,40p'
Response Headers (relevant lines):
HTTP/2 403
x-error-code: GatedRepo
x-error-message: Access to model pyannote/speaker-diarization-3.1 is restricted and you are not in the authorized list. Visit https://huggingface.co/pyannote/speaker-diarization-3.1 to ask for access.
So the resolver endpoint denies access.
Step 4 — Attempt the same download via huggingface_hub with an explicit token (fails)
python3 - <<'PY'
import getpass
from huggingface_hub import hf_hub_download
token = getpass.getpass("Paste HF token (input hidden): ").strip()
path = hf_hub_download(
repo_id="pyannote/speaker-diarization-3.1",
filename="config.yaml",
token=token, # explicit; no cache/env reliance
)
print("OK downloaded to:", path)
PY
Traceback (relevant lines):
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url:
https://huggingface.co/pyannote/speaker-diarization-3.1/resolve/main/config.yaml
huggingface_hub.utils._errors.GatedRepoError: 403 Client Error.
Cannot access gated repo for url https://huggingface.co/pyannote/speaker-diarization-3.1/resolve/main/config.yaml.
Access to model pyannote/speaker-diarization-3.1 is restricted and you are not in the authorized list.
What I ruled out
“Python stack isn’t sending the token I think it is”
Ruled out by:
- Passing token explicitly to
hf_hub_download(..., token=token)(no cached token usage), - And reproducing the same
403 GatedRepowithcurlwhere the header is explicitly set.
“Token invalid”
Ruled out by:
- Successful
GET https://huggingface.co/api/whoami-v2using the same token.
“Model doesn’t exist / typo”
Ruled out by:
- Successful
GET https://huggingface.co/api/models/pyannote/speaker-diarization-3.1showing the repo metadata and listingconfig.yaml.
Ask
Could Hugging Face staff verify that my account is correctly authorized for
pyannote/speaker-diarization-3.1 at the resolver endpoint, and whether there is a
known entitlement cache or propagation issue for auto-gated repos?
Does anyone on the forum know about this problem and have a workaround?
Thanks!
^M^
