Repository navigation
fix(insane): bump transformers to 4.55.4 for Whisper timestamp fixes - #83
Merged
Merged
Conversation
… fixes The HF transformers Whisper pipeline (used by --device insane) had a chunked-decoding timestamp-offset bug where the WhisperTokenizer would report incorrect offsets across chunks and long-form sequential decoding would roll over timestamps every 30 seconds. Three upstream PRs land the fixes: - huggingface/transformers#34537 (in v4.47.0) -- WhisperTokenizer chunk-offset - huggingface/transformers#35295 (in v4.48.0) -- Mac MPS float64 regression (this fix is why our pin was previously frozen at 4.46.3) - huggingface/transformers#35750 (in v4.53.0) -- long-form sequential decoding 30-second timestamp rollover A single bump to 4.55.4 clears all three. insanely-fast-whisper==0.0.15 has no transformers pin so it accepts the bump unconstrained. While rebuilding the insane venv with the new pin, openai-whisper's build failed under setuptools>=82 (which removed pkg_resources). The whisper.py venv already had a build-constraint-dependencies pin for this; this commit adds the matching guard to insanely_fast_whisper_reqs. Tests: - tests/test_transformers_version_floor.py: pure-unit floor guard. Asserts (a) the transformers pin uses == style, matching the file's existing convention, and (b) the version tuple is >= (4, 53, 0). Red before the bump, green after. Locks the floor against future silent regressions. - tests/test_insane_vs_cuda_longform_timestamps.py: NVIDIA-gated end-to-end test. Loops the bundled sample.mp3 four times into a ~40 second wav (so it spans the 30-s chunk boundary that triggers the upstream bug), runs both --device cuda and --device insane via the public transcribe() API with --model tiny, and asserts the last-segment end timestamps agree within 1 s and bracket the wav's true duration. Passes on the RTX 3060 host in ~30 s with warm venvs. Verified on this host: cuda last and insane last both land within 1 s of wav_duration (~40 s) -- direct end-to-end proof that the upstream chunked-decoding fix is doing its job for our users on long-form audio. Mac MPS smoke check pending an out-of-band run on a Mac (the bump makes MPS compatible again per PR #35295, but I can't verify here). Future work tracked separately: - #81 migrate --device insane backend from HF pipeline to WhisperX - #82 expose --diarization-via-whisperx opt-in Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
zackees
added a commit
that referenced
this pull request
May 30, 2026
Whisper timestamp + insane-backend rebuild reliability: - Bumps transformers pin 4.46.3 -> 4.55.4 in the --device insane venv. Picks up huggingface/transformers PRs #34537 (WhisperTokenizer chunk-offset decode), #35295 (Mac MPS float64 regression), and #35750 (long-form 30-s timestamp rollover). - Adds setuptools<82 build constraint to the insane venv so openai-whisper==20240930 keeps building (it imports pkg_resources, removed in setuptools 82). - Adds NVIDIA-gated end-to-end test verifying both --device cuda and --device insane agree on last-segment timestamps to within 1 s on a 40 s clip. - Adds pure-unit floor test pinning transformers >= 4.53.0. See PR #83. Future-work issues #81 (WhisperX migration) and #82 (--diarization-via-whisperx opt-in) tracked separately. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Jun 3, 2026
Closed
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
Bumps the transformers pin in the
--device insanevenv from4.46.3(Oct 2024) to4.55.4to pick up the upstream Whisper-timestamp fixes that landed between then and now.Why
The HF transformers Whisper pipeline (which
--device insaneultimately invokes viainsanely-fast-whisper) had a chunked-decoding offset bug:WhisperTokenizer.decodewould offset timestamps incorrectly across chunks, and long-form sequential decoding would reset every 30 s. Three upstream PRs land the fixes:A single bump to
4.55.4clears all three.What else this required
While the new pin invalidates the on-disk venv content hash, iso-env rebuilds — and that rebuild surfaced a latent issue:
openai-whisper==20240930fails to build undersetuptools>=82(which removedpkg_resources).whisper.pyalready had abuild-constraint-dependencies = [\"setuptools<82\"]guard; this PR adds the matching guard toinsanley_fast_whisper_reqs.py.Tests (TDD red → green)
tests/test_transformers_version_floor.py(pure-unit, hermetic, 3 cases):==style (file convention)_get_reqs_generic(has_nvidia=True)returns transformers>= (4, 53, 0)has_nvidia=Falsemain(4.46.3 < 4.53.0), green after the bump.tests/test_insane_vs_cuda_longform_timestamps.py(NVIDIA-gated, e2e):sample.mp3four times viaffmpeg -stream_loop 3into a ~40 s wav (so it spans the 30 s chunk boundary that triggered the upstream bug).transcribe()API with--model tiny.wav_duration ≈ 40 s, with the test completing in ~30 s on warm venvs.Test plan
pytest tests/test_transformers_version_floor.py(3 pass)pytest tests/test_insane_vs_cuda_longform_timestamps.py(1 pass on this NVIDIA host)transcribe-anything <any.wav> --device mlxagainst a short clip to confirm the MPS path works under transformers 4.55.4 (PR #35295 should make this work again). Not gating merge.Future work tracked separately
--device insanebackend from HF pipeline to WhisperX--diarization-via-whisperxopt-in🤖 Generated with Claude Code