Skip to content

fix: correct MiniMax H3 audio Euler steps - #1908

Open
jk212h20 wants to merge 1 commit into
leejet:masterfrom
jk212h20:fix/minimax-h3-audio-scheduler
Open

fix: correct MiniMax H3 audio Euler steps#1908
jk212h20 wants to merge 1 commit into
leejet:masterfrom
jk212h20:fix/minimax-h3-audio-scheduler

Conversation

@jk212h20

Copy link
Copy Markdown

Summary

Fix MiniMax H3 generated audio degradation with Euler sampling, especially at the low step counts used by the Turbo LoRA.

H3 conditions video and audio on different shifted flow schedules (video shift 12, audio shift 3). The existing implementation converts the audio velocity to the video clock with the local derivative d sigma_audio / d sigma_video. That is an infinitesimal conversion, but the Euler sampler advances over finite sigma intervals. Because the mapping between schedules is nonlinear, the derivative approximation over-advances audio at low step counts.

For ordinary Euler evaluations, this PR instead scales audio velocity by the exact finite-step ratio:

(sigma_audio_current - sigma_audio_next)
-----------------------------------------
(sigma_video_current - sigma_video_next)

This makes the packed-latent Euler update algebraically equivalent to advancing audio with its own shift-3 sigma interval. Other samplers retain the existing local-slope behavior because they may make intermediate or repeated model evaluations and need a more general dual-clock integration design.

Impact

The derivative approximation's cumulative audio advance is about:

  • 2.17x at 4 intervals
  • 1.45x at 8 intervals
  • 1.14x at 20 intervals
  • 1.09x at 30 intervals

This explains why H3 Turbo audio is affected most strongly while higher-step full-model output can still be degraded.

The issue applies to generated audio in T2VA, FL2VA, and Ref2VA. It is separate from the reference-audio encoder correction in #1886.

Validation

  • Verified numerically at 4, 8, 20, and 30 intervals that every scaled packed-Euler audio delta equals the corresponding independent audio-schedule delta, and that the complete audio schedule integrates from 1 to 0 exactly.
  • Clean configure and sd-cli build on macOS/Metal against current master.
  • sd-cli --help smoke test.
  • Runtime-tested MiniMax H3 Ref2VA with the Turbo LoRA, Euler/simple, 4 steps, and fixed seed. The previous output had severely malformed audio; with exact finite-step scaling, the generated speech/audio was clear and subjectively correct.

Scope

Only the standard Euler path supplies a next sigma. Unsupported sampler paths continue using the previous derivative conversion, avoiding behavior changes until they can carry independent audio schedule state correctly.

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