Skip to content

[Bugfix] Exclude incomplete Higgs Audio v3 frames before codec decoding - #7942

Open
ss1127201970 wants to merge 1 commit into
vllm-project:mainfrom
ss1127201970:fix/higgs-v3-invalid-tail-frames
Open

ss1127201970 wants to merge 1 commit into
vllm-project:mainfrom
ss1127201970:fix/higgs-v3-invalid-tail-frames

Conversation

@ss1127201970

@ss1127201970 ss1127201970 commented Sep 21, 2026 •

Copy link
Copy Markdown

Purpose

Fixes #7941.

Higgs Audio v3 can emit multiple incomplete codec frames during EOC ramp-down. Replacing their special/pad tokens with code 0 and trimming one final frame leaves a mixed EOC/audio frame in the decoder input, causing a sentence-tail noise burst.

Keep the contiguous complete-frame prefix after reversing the delay pattern. Apply it in the shared whole-utterance and streaming helpers, so sync, token-only, MRV2 full-payload, and scalar/batched streaming entrypoints agree. Invalid frames are excluded from right context too; emitted-frame counts and context metadata reflect the actual retained frames. Complete final frames are preserved.

Rebased onto f69b1f2b19cece03f6736c7da093ea25de0e24fd, including the MRV2 refactor from #8226. This does not include the separate local codec-boundary audio-quality experiment.

Test plan and results

The CPU regression matrix covers exact codec values/order, 0/1/25/144 real frames, mixed/all/no EOC tails, holdback 0/1/4, left context 0/3, chunk size 1/25, and finish arriving with the last row or separately. It now covers 612 cases across all five entrypoints. No checkpoint is required.

python -m pytest tests/model_executor/stage_input_processors/test_higgs_audio_v3_tail.py -m 'core_model and cpu'
python -m pytest tests/model_executor/models/higgs_audio_v3/test_higgs_audio_v3.py -k StageInputProcessor

Current refresh:

  • Fixed the Ruff formatting change reported by the previous CI run.
  • SPDX/test-marker checks and git diff --check pass; independent code review found no blocking issues.
  • Real pytest 9.1.1 was attempted against the refreshed source with installed PyTorch 2.13.0 / vLLM 0.28.0. Collection is blocked because current main imports KVConnectorBlockState, which that vLLM version does not provide. No tests ran in this attempt. A fixture-isolated retry reached the same package-import incompatibility. Full current-main pytest/GPU suites remain unverified; CI results are tracked separately.

Historical validation of the original fix on vLLM-Omni 0.28.0:

  • All 300 original parameter combinations passed via direct invocation of the unchanged test bodies using an AST runner (not formal pytest collection); the original processor failed 192 cases.
  • Real voice-clone synthesis on RTX 4090 D: 20 Chinese/English samples regenerated with seed 42. Model revision and chunk settings are in the issue.
  • Same-code FP32 replay: 144 complete frames plus two incomplete frames became 145 decoder frames before the fix and 144 after it. Final 20 ms RMS decreased from 0.08618 to 0.000595 (~43 dB).

AI disclosure: Codex assisted with diagnosis, implementation, tests, and this write-up.

@vllm-omni-review-bot

Copy link
Copy Markdown

This PR appears to belong to: docs/design/module/input_output_modality_contracts.md, docs/design/module/model_integration.md, docs/design/module/ar_runtime.md.

Module owners: @alex-jw-brooks @amy-why-3459 @Gaohan123

Routing: @alex-jw-brooks via module of the changed files, semantic router; @amy-why-3459 via module of the changed files, semantic router; @Gaohan123 via module of the changed files, semantic router

@ss1127201970, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer.

Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment.

@vllm-omni-review-bot

vllm-omni-review-bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Omni ReviewBot triage note

Automated triage of commit 2c21046b01b5 produced:

  • Priority: high. Prompt maintainer attention is suggested.

These are automated triage suggestions only — the final decision belongs to the maintainers.

@hsliuustc0106 hsliuustc0106 added bug Something isn't working tts code related to tts models labels Sep 22, 2026
@vllm-omni-review-bot

vllm-omni-review-bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Omni ReviewBot: superseded

The CI failure noted on 1336a970313c refers to an earlier head; the pull request now points at 2c21046b01b5.

@vllm-omni-review-bot

Copy link
Copy Markdown

Omni ReviewBot: no human activity for 8 days

@ss1127201970 this pull request has had no human commit, comment or review since 2026-09-21. Please confirm the current plan and next step. The author or a maintainer decides whether to change the PR state.

To keep it moving, any one of these is enough: push an update, reply to the open blocker, or post the current plan and timeline.

@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot routing record

Assigned Strict on zcode (GLM-5.3-Flash) under experiment fleet-strict-cursor-grok46-zcode-glm53flash-5050-c5-z10-20261002.

@ss1127201970
ss1127201970 force-pushed the fix/higgs-v3-invalid-tail-frames branch from 1336a97 to 2c21046 Compare October 10, 2026 03:27
@ss1127201970

Copy link
Copy Markdown
Author

Rebased onto current main and fixed the Ruff formatting failure.

Self-review: checked the shared whole-utterance and streaming helpers after #8226, including MRV2 full-payload and batched streaming. The regression matrix now covers all five entrypoints. I checked that invalid tail frames cannot enter audio or right context, valid final frames remain intact, and frame counters/context metadata follow the frames actually emitted. Independent review found no blocking issues.

SPDX, test-marker and diff checks pass. Formal pytest collection is currently blocked by an environment mismatch: main requires KVConnectorBlockState, absent from the available vLLM 0.28.0 runtime. The PR description separates this from the earlier runtime/audio validation; I have not counted collection failure as a test pass.

@vllm-omni-review-bot please review the updated diff. Maintainer review is welcome as well.

@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot attempt record

Review attempt ended as failed (step 'review' (agent.review_diff): unhandled error: RuntimeError: zcode exited 1 without a result event: statusCode: undefined } Error: Turn execution failed (traceId: da8c57d0-664f-489f-947a-78de5b6c6700) — check zcode login and the CLI version; retrying strict/zcode/GLM-5.3-Flash in 120s (try ).

@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot attempt record

Review attempt ended as failed (step 'review' (agent.review_diff): unhandled error: RuntimeError: zcode exited 1 without a result event: statusCode: undefined } Error: Turn execution failed (traceId: e6fc87b2-3eef-4e06-8886-28aad2cb5466) — check zcode login and the CLI version; retrying strict/zcode/GLM-5.3-Flash in 600s (try ).

@vllm-omni-review-bot

Copy link
Copy Markdown
Omni ReviewBot attempt record

Review attempt ended as failed (step 'review' (agent.review_diff): unhandled error: RuntimeError: zcode exited 1 without a result event: statusCode: undefined } Error: Turn execution failed (traceId: 4f1f8f28-876f-4948-b67a-c6302013abc7) — check zcode login and the CLI version; falling back to direct/cursor/auto).

@vllm-omni-review-bot vllm-omni-review-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omni ReviewBot review

0 actionable finding(s).

CI at 2c21046b01b5 (2026-10-10T04:46:55.252558+00:00): required check(s) blocking: buildkite/vllm-omni (missing).

Note: The assigned review arm strict/zcode/GLM-5.3-Flash could not complete this review, so it was produced by the fallback arm direct/cursor/auto. It is excluded from the routing experiment.

Full review analysis

PR description

Higgs Audio v3 now keeps only the contiguous complete codec-frame prefix after delay-pattern reversal. A frame that still contains an end-of-code or pad value is excluded from decoder input, including streaming right context, and later frames are left on the original timeline. The same helper feeds the sync, token-only, and full-payload paths and the scalar and batched streaming flush, so emitted-frame counts and context metadata follow the frames that are actually retained. Complete final frames stay in the codec input.

Change flow

flowchart LR
  rows["[EXISTING] Delayed talker code rows"]:::existing
  helpers["[CHANGED] Whole-utterance and stream flush"]:::changed
  prefix["[NEW] _valid_code_prefix"]:::new
  codec["[CHANGED] Codec frames and context metadata"]:::changed
  tests["[NEW] Five-entrypoint tail matrix"]:::new
  rows --> helpers
  helpers --> prefix
  prefix --> codec
  tests --> helpers
  classDef existing fill:#e5e7eb,stroke:#6b7280,color:#111827
  classDef changed fill:#fef3c7,stroke:#d97706,color:#451a03,stroke-width:2px
  classDef new fill:#dcfce7,stroke:#16a34a,color:#052e16,stroke-width:2px
  classDef removed fill:#fee2e2,stroke:#dc2626,color:#450a0a,stroke-width:2px
Loading

No actionable findings.


🤖 This review was generated by InferMatrix Copilot, an open-source repo-maintenance agent for PR review, CI debugging and issue triage. Try it on your own repo, and ⭐ star it if it helped!

@vllm-omni-review-bot

Copy link
Copy Markdown

Omni ReviewBot: no human activity for 7 days

@ss1127201970 this pull request has had no human commit, comment or review since 2026-10-10. Please confirm the current plan and next step. The author or a maintainer decides whether to change the PR state.

To keep it moving, any one of these is enough: push an update, reply to the open blocker, or post the current plan and timeline.

@vllm-omni-review-bot

Copy link
Copy Markdown

Omni ReviewBot: no human activity for 14 days

@ss1127201970 this pull request has had no human commit, comment or review since 2026-10-10. Please consider marking this PR as draft until work can resume. The author or a maintainer decides whether to change the PR state.

To keep it moving, any one of these is enough: push an update, reply to the open blocker, or post the current plan and timeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working tts code related to tts models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Higgs Audio v3 decodes incomplete end frames as audio

3 participants