Skip to content

Fix Whisper models hanging/failing to load while Parakeet works fine - #27

Open
Dopixel wants to merge 1 commit into
zachswift615:mainfrom
Dopixel:fix/whisper-model-loading-hang
Open

Fix Whisper models hanging/failing to load while Parakeet works fine#27
Dopixel wants to merge 1 commit into
zachswift615:mainfrom
Dopixel:fix/whisper-model-loading-hang

Conversation

@Dopixel

@Dopixel Dopixel commented Jul 22, 2026

Copy link
Copy Markdown

Every Whisper model load called WhisperKit.download(), which performs a live Hugging Face Hub round-trip to list and verify remote files, even when the model is already fully downloaded on disk. If that request stalled, loading would hang indefinitely with no timeout and no way to fall back to the local files already present - reproducible by simply re-selecting an already-downloaded model from the menu bar.

  • Skip the Hub round-trip entirely when the model's local folder is already known, loading WhisperKit directly from disk instead (this is what Parakeet/FluidAudio already does, which is why only Parakeet worked reliably).
  • Wrap the remaining WhisperKit init in a generous timeout, since first- time loads still require a real (sometimes slow, several-minute) on-device Neural Engine model compilation plus a tokenizer fetch from a separate Hub repo - so a genuinely stalled request now fails with a clear error instead of spinning "Loading..." forever.
  • Fix a dormant matching bug in the "is this model downloaded" folder scan: it compared variant strings for exact equality against on-disk folder names, but downloaded folders are always prefixed with "openai_whisper-" while the variant string only sometimes is (broken for base.en, small.en, and large-v3 specifically).

Every Whisper model load called WhisperKit.download(), which performs a
live Hugging Face Hub round-trip to list and verify remote files, even
when the model is already fully downloaded on disk. If that request
stalled, loading would hang indefinitely with no timeout and no way to
fall back to the local files already present - reproducible by simply
re-selecting an already-downloaded model from the menu bar.

- Skip the Hub round-trip entirely when the model's local folder is
  already known, loading WhisperKit directly from disk instead (this is
  what Parakeet/FluidAudio already does, which is why only Parakeet
  worked reliably).
- Wrap the remaining WhisperKit init in a generous timeout, since first-
  time loads still require a real (sometimes slow, several-minute)
  on-device Neural Engine model compilation plus a tokenizer fetch from
  a separate Hub repo - so a genuinely stalled request now fails with a
  clear error instead of spinning "Loading..." forever.
- Fix a dormant matching bug in the "is this model downloaded" folder
  scan: it compared variant strings for exact equality against on-disk
  folder names, but downloaded folders are always prefixed with
  "openai_whisper-" while the variant string only sometimes is (broken
  for base.en, small.en, and large-v3 specifically).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant