Fix Whisper models hanging/failing to load while Parakeet works fine - #27
Open
Dopixel wants to merge 1 commit into
Open
Fix Whisper models hanging/failing to load while Parakeet works fine#27Dopixel wants to merge 1 commit into
Dopixel wants to merge 1 commit into
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.