I created a user access token with write permissions. Using that token and able to use the model pipeline = Pipeline.from_pretrained(“pyannote/speaker-diarization”, use_auth_token=access_token). But I am getting the following Error.
I have been getting a variety of errors when trying to get this model the past ~24 hours. I’m going to keep trying periodically, will report back if things go green.
however i only get it at one computer, even though the code and authentification token are exactly the same
any idea why it works differently on different machines?
thank you
Generate, only ‘READ’ token using your Huggingface account settings–>access Tokens
Login to Huggingface through the command line using the command “huggingface-cli login”. This will ask you the token created in step 4 and then append this token under your ‘.huggingface’ folder.
From now, you may either instantiate the ‘use_auth_token’ option of the pipeline with your token or give only the ‘True’ option.
I’m facing a persistent authorization issue when trying to use the pyannote/speaker-diarization model — even though I’ve carefully followed all steps:
What I’ve already done:
Generated a token with WRITE permissions (includes READ)
Explicitly accepted access conditions for:
pyannote/speaker-diarization
pyannote/segmentation
Cleared local Hugging Face cache (~/.cache/huggingface)
Tried both login via huggingface-cli login and direct token usage in code
Result:
Whether I try:
pipeline = Pipeline.from_pretrained(
"pyannote/speaker-diarization",
use_auth_token="hf_..."
)
or :
huggingface-cli login
→ I systematically get:
401 Client Error: Unauthorized for url: https://huggingface.co/api/whoami-v2
Invalid credentials in Authorization header
🔍 Notes:
The token is newly generated and works for other models.
My access is confirmed as "accepted" in the Gated Repositories page.
No environment variable conflicts (e.g., HF_TOKEN), and Git credentials are clean.
No clear documentation mentioning that both diarization and segmentation terms must be accepted to make the pipeline work.
➡️ Has anyone faced the same issue? Is there a known workaround?
Thanks in advance 🙏
Update :
I carefully followed the official procedure described by Hervé Bredin, the author of pyannote.audio. Here’s what I did:
✅ Installed pyannote.audio version ≥ 2.1.1
✅ Accepted terms for both pyannote/speaker-diarization and pyannote/segmentation
✅ Created a fresh WRITE token (which includes READ)
✅ Logged in using huggingface-cli login (declined git credential prompt)
✅ Cleared cache and checked for leftover HF_TOKEN environment variable
✅ Tried both use_auth_token="hf_..." and use_auth_token=True
✅ Still getting 401 Unauthorized error
Despite all that, I consistently get the same Invalid credentials in Authorization header response when calling the pipeline.
Could this be a backend propagation issue or an unexpected token validation bug?
Even with a freshly created WRITE token, the login and all authenticated API calls fail—whether passing the token inline or via CLI. The token is valid and visible in my account.
It seems to be an authentication bug on Hugging Face’s side. Happy to provide more details or test any workaround.
Hmm… If it’s a library-level bug, it would be best to raise an issue on GitHub, but if it’s not a library-level bug, it might be more reliable to email Hugging Face directly. They should be able to tell you how the token was handled from their server side. [email protected]
I agree — at this point it’s hard to tell whether the issue is client-side or server-side. Since huggingface-cli login fails consistently despite a valid token, I’ll try reaching out directly to Hugging Face at [email protected] to clarify how the token is processed on their end.
If it turns out to be a bug in the huggingface_hub library, I’ll open a GitHub issue with a detailed report.