Skip to content

Minimax music3 continuation - #14478

Closed
alexayers wants to merge 15 commits into
huggingface:mainfrom
diskrotrepo:minimax-music3-continuation
Closed

Minimax music3 continuation#14478
alexayers wants to merge 15 commits into
huggingface:mainfrom
diskrotrepo:minimax-music3-continuation

Conversation

@alexayers

Copy link
Copy Markdown

What does this PR do?

Fixes # (issue)

Before submitting

  • Did you use an AI agent (Claude Code, Codex, Cursor, etc.) to help with this PR? If so:
    • Did you read the Coding with AI agents guide?
    • Did you run the self-review skill on the diff?
    • Did you share the final self-review notes in the PR description or a comment?
  • Did you read the contributor guideline?
  • Did you read our philosophy doc? (important for complex PRs)
  • Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?
  • Are you the author (or part of the team) of the model/pipeline (only applicable for model/pipeline related PRs)?

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.

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
@github-actions github-actions Bot added size/L PR with diff > 200 LOC documentation Improvements or additions to documentation models tests modular-pipelines utils labels Aug 14, 2026
alexayers and others added 3 commits August 14, 2026 12:04
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
alexayers force-pushed the minimax-music3-continuation branch from 957cdf7 to 2b4a760 Compare August 14, 2026 18:33
@diskrotrepo diskrotrepo closed this by deleting the head repository Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation models modular-pipelines size/L PR with diff > 200 LOC tests utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants