Skip to content

fix(higgs): strip delay-pattern BOS/EOS columns before codec decode#843

Closed
Thorfy wants to merge 1 commit into
Blaizzy:mainfrom
Thorfy:fix/higgs-strip-stream-marker-columns
Closed

fix(higgs): strip delay-pattern BOS/EOS columns before codec decode#843
Thorfy wants to merge 1 commit into
Blaizzy:mainfrom
Thorfy:fix/higgs-strip-stream-marker-columns

Conversation

@Thorfy

@Thorfy Thorfy commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • Higgs delay-pattern EOS ramp leaves mixed marker+code columns after revert_delay_pattern.
  • [:, 1:-1] only drops all-marker edges; surviving audio_stream_eos_id values were clip'd to 1023 and decoded as a systematic end breath.
  • Replace that trim with strip_stream_marker_columns (oneshot + overlap-add decode paths).

Fixes #842

Why this is not the Qwen3 fix

Qwen3 trailing breath is late codec_eos sampling after PR 695 (tracked separately). Higgs is a post-revert token hygiene bug in the delay-pattern pipeline.

Test plan

  • python -m unittest mlx_audio.tts.tests.test_higgs_audio.TestStripStreamMarkerColumns
  • Voice-clone oneshot: check end of WAV no longer has the systematic breath
  • stream=True overlap-add path: same check on final chunk

After revert_delay_pattern, the EOS ramp leaves mixed marker+code columns.
The old [:, 1:-1] trim only removes all-marker edges; surviving stream ids
were clipped to codebook_size-1 (1023) and decoded as a systematic breath
at utterance end. Drop any column that still carries stream BOS/EOS instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Thorfy Thorfy closed this Jul 16, 2026
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.

Higgs Audio v2: EOS ramp columns clipped to 1023 cause end-of-utterance breath

1 participant