Minimax music3 continuation - #14478
Closed
alexayers wants to merge 15 commits into
Closed
Conversation
…I/MiniMax-Music-3
Per review: the conditioner moves to models/condition_embedders, the RVQ depth decoder and vocoder to models/transformers and models/autoencoders, and the standard pipeline is replaced by MiniMaxMusic3ModularPipeline (anima-style blocks, helios-style chunk loop, guider-abstracted CFG with a zeros unconditional branch). Index configs now reference all components under the diffusers library. Also applies the transformer review suggestions (Transformer2DModelOutput, inlined rotary forward, explicit processor default).
…e-level progress bar, zero-frame duration guard, import ordering, docstring cross-reference
…ubmodule calls (minimax_h3 workaround), clear error when the AR models cannot co-reside
MiniMaxMusic3SemanticGenerationStep gains an optional `prefix_frame_codes` input and a `frame_codes` output. When a prefix is supplied it is replayed into the language model's KV cache before sampling so the run continues (extends) the prior audio instead of starting from silence; the returned `frame_codes` is the resumable handle for extending further. - audio_duration now bounds only the new frames; prefix + new share the 9000-frame budget. - the "first frame is warmup" emission rule now keys off whether any frame has been fed (fed_codes) rather than frame_index == 0, so a prefix removes the seam gap; with no prefix behavior is identical to upstream. Only supports extending audio generated by this model — the released checkpoint ships no waveform->codes analysis encoder, noted at the site.
The autoregressive stage's sampling parameters were fixed module constants from the reference recipe (CFG 1.5, top-k 50). They are now per-run pipeline inputs with those same defaults, applied to both the semantic head and the RVQ depth decoder. Raising cfg_scale is the lever for making prompt/lyrics adherence win against a continuation prefix's musical momentum.
The continuation prefix was fed to the language model one frame per forward pass - decode speed - so extending a 2-minute song spent ~2 minutes just rebuilding the KV cache. Replayed frames need no sampling feedback (their codes are known), so batch their embeddings along the sequence dimension and run whole 1024-frame chunks through single causal forwards. Produces the same cache and last hidden state; the batched embedding is bit-identical to the per-frame path.
alexayers
force-pushed
the
minimax-music3-continuation
branch
from
August 14, 2026 18:33
957cdf7 to
2b4a760
Compare
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.
What does this PR do?
Fixes # (issue)
Before submitting
self-reviewskill on the diff?documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.