Skip to content

[serge] Fix 12 integration tests for model dac failing with output_mismatch (tensor values differ (6), other (6))#46941

Open
sergereview[bot] wants to merge 1 commit into
mainfrom
serge/fix/itf-aa1fcb5380a3-5e00c2dd
Open

[serge] Fix 12 integration tests for model dac failing with output_mismatch (tensor values differ (6), other (6))#46941
sergereview[bot] wants to merge 1 commit into
mainfrom
serge/fix/itf-aa1fcb5380a3-5e00c2dd

Conversation

@sergereview

@sergereview sergereview Bot commented Jun 28, 2026

Copy link
Copy Markdown

Original CI failure

  • Failure group: 1/1: 12 integration tests for model dacfailing withoutput_mismatch (tensor values differ (6), other (6))
  • tests/models/dac/test_modeling_dac.py::DacIntegrationTest::test_integration_0_dac_16khz [multi-gpu] (output_mismatch, seen 7/7)

Relates to #46940

The DAC integration tests fail because DacVectorQuantize.decode_latents computes the codebook distance with misplaced parentheses. The current expression adds the codebook norm instead of subtracting it, so the nearest-neighbor lookup does not minimize Euclidean distance. This causes the quantized codes and decoded audio to drift from the expected values.

Fix the distance formula to negate the full squared-distance expression, matching the equivalent EnCodec/XCodec codebooks and the mathematical intent. This is a one-character parenthesis fix in src/transformers/models/dac/modeling_dac.py.


This change was produced automatically by serge from a CI failure report. The patch was generated by an LLM and applied by serge; review before merging.

serge v0.1.0 · model: moonshotai/Kimi-K2.7-Code · 27 LLM turns · 30 tool calls · 58.3s · 555794 in / 10331 out tokens

…_mismatch` (tensor values differ (6), other (6))
@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: dac

@github-actions

Copy link
Copy Markdown
Contributor

CI Dashboard: View test results in Grafana

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

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.

1 participant