Disable context_window_optimization by default#130
Merged
peteonrails merged 1 commit intomainfrom Jan 27, 2026
Merged
Conversation
Some Whisper models (especially large-v3 and large-v3-turbo) experience phrase repetition loops when context window optimization is enabled. This change disables the optimization by default for maximum compatibility while making it safer when explicitly enabled. Changes: - Default context_window_optimization to false - Add no_context=true when optimization is enabled (prevents repetition) - Use more conservative formula with minimum threshold (384 frames) - Align audio_ctx to multiple of 8 for GPU backend compatibility - Update documentation and troubleshooting guide Closes #124 Co-authored-by: Christopher Albert <albert@alumni.tugraz.at>
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.
Summary
context_window_optimizationby default to prevent phrase repetitionno_context=truewhen optimization is enabled (fix from PR Prevent Whisper hallucination/looping with no_context=true #116)Problem
Some Whisper models (especially large-v3 and large-v3-turbo) experience phrase repetition loops when context window optimization is enabled. Users report output like "word word word" when saying something once.
Solution
no_context=trueto prevent text conditioning loopsTest plan
Closes #124
Co-authored-by: Christopher Albert albert@alumni.tugraz.at