Free | No tracking | Every fact with a source|German and English

Error / Models and files

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

  1. Create a token with read permissions at https://hf.co/settings/tokens.
  2. 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 use pyannote/speaker-diarization-3.1 and also pyannote/segmentation-3.0 – if in doubt, confirm all of them.
  3. Pass the token when you start: whisperx audio.wav --model large-v2 --diarize --hf_token DEIN_TOKEN.
  4. In your own Python code, pass it like this: DiarizationPipeline(token=DEIN_TOKEN, device=device). Older versions expect use_auth_token= instead.
  5. 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:

Terms for this

Similar errors

Sources

Checked on Oct 28, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.