WhisperX: Could not download 'pyannote/speaker-diarization…' pipeline / 'NoneType' object has no attribute 'to' (speaker diarization must not load the model)
WhisperX’s speaker diarization, which is built on faster-whisper, cannot download the pyannote model from Hugging Face. The following NoneType error is only a consequence of that.
The message
Could not download 'pyannote/speaker-diarization-3.1' pipeline. It might be because the pipeline is private or gated so make sure to authenticate. Visit https://hf.co/settings/tokens to create your access token and retry with: … AttributeError: 'NoneType' object has no attribute 'to'
Affects: faster-whisper, Hugging Face (Hub and hf CLI)
Why is this happening?
The pyannote models for speaker diarization are gated: you have to be signed in to Hugging Face, confirm the terms on the model page, and pass WhisperX an access token. If any of that is missing, pyannote does not return a model (None), and the next call like .to(...) fails with “'NoneType' object has no attribute 'to'”.
How to fix it
- Create a token with read permissions at https://hf.co/settings/tokens.
- Open the page for the model used by your WhisperX version, and confirm the terms there. The current WhisperX guide mentions
speaker-diarization-community-1; older versions usepyannote/speaker-diarization-3.1and alsopyannote/segmentation-3.0– if in doubt, confirm all of them. - Pass the token when you start:
whisperx audio.wav --model large-v2 --diarize --hf_token DEIN_TOKEN. - In your own Python code, pass it like this:
DiarizationPipeline(token=DEIN_TOKEN, device=device). Older versions expectuse_auth_token=instead. - Make sure you confirmed the terms with the same Hugging Face account that the token belongs to, then restart WhisperX.
Better not: Don’t look for the cause in “'NoneType' object has no attribute 'to'” – the real cause is further up in the log at “Could not download”.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- Subtitles and Transcripts with Whisper
Transcribe videos and audio locally with Whisper — easily with Buzz, polished afterward with Subtitle Edit, export as SRT, VTT, or TXT.
Terms for this
Similar errors
- whisper.cpp: invalid model data (bad magic) (model file has the wrong format)
- Hugging Face: 429 Client Error: Too Many Requests / We had to rate limit you – too many requests, you’re being throttled
- Hugging Face download stops or hangs (.incomplete)
- Hugging Face: Cannot access gated repo (401)
- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate – Python does not trust the certificate (often a company proxy or antivirus)
Sources
- https://github.com/m-bain/whisperX/issues/498
- https://github.com/m-bain/whisperX/blob/main/README.md
- https://huggingface.co/spaces/aperrot42/ucare
Checked on Oct 28, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.