whisper.cpp: invalid model data (bad magic) (model file has the wrong format)
whisper.cpp found the model file, but does not recognize its contents as a ggml Whisper model and stops loading.
The message
whisper_model_load: invalid model data (bad magic)
whisper_init_with_params_no_state: failed to load model
Affects: whisper.cpp, faster-whisper
Why is this happening?
whisper.cpp only reads models in its own ggml format (files like ggml-base.bin). If the program checks the file header and does not find the expected signature, it reports “bad magic”. A typical cause is someone renaming a model for faster-whisper (CTranslate2 format from Hugging Face) or an original PyTorch model to .bin. A faulty download can also cause this, for example an HTML error page saved as .bin or just a small Git LFS placeholder instead of the real file. If whisper.cpp instead only says “failed to open”, the path is probably wrong.
How to fix it
- Do not rename other models to
.bin. Models from faster-whisper or WhisperX do not run in whisper.cpp. - Check the file size: if the file is only a few kilobytes or starts with an HTML tag in a text editor, the download is broken — download it again.
- Download a ready-converted model from the official Hugging Face folder https://huggingface.co/ggerganov/whisper.cpp/tree/main, for example
ggml-base.binorggml-large-v3.bin. - On Windows, you can also do this in the whisper.cpp folder with a script:
.\models\download-ggml-model.cmd base(under Linux/WSLsh ./models/download-ggml-model.sh base). - Pass the new model at startup with
-m, for examplewhisper-cli -m models\ggml-base.bin -f audio.wav. - If you want to use your own or fine-tuned model, convert it with the scripts from the
modelsfolder: original PyTorch files (.pt) withconvert-pt-to-ggml.py, Hugging Face models withconvert-h5-to-ggml.py.
Better not: Do not rely on the file extension: a file is not a ggml model just because it ends in .bin.
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
- WhisperX: Could not download 'pyannote/speaker-diarization…' pipeline / 'NoneType' object has no attribute 'to' (speaker diarization must not load the model)
- faster-whisper: Requested float16 compute type, but the target device or backend do not support efficient float16 computation (rechen format doesn't match the device)
- whisper.cpp: WARNING: The binary 'main.exe' is deprecated (program is now called whisper-cli.exe)
- faster-whisper: cublas64_12.dll is not found
- LM Studio: Error rendering prompt with jinja template (Model chat template cannot be processed)
Sources
- https://github.com/thewh1teagle/vibe/issues/676
- https://github.com/ggml-org/whisper.cpp/blob/master/models/README.md
- https://github.com/ggml-org/whisper.cpp/blob/master/README.md
- https://dev.to/multigrid/whispercpp-failed-to-load-model-5gmi
Checked on Oct 28, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.