Skip to content

vllm_omni.model_executor.models.minimax_music3.chunking

Chunk boundary and overlap arithmetic for MiniMax Music 3.

The AR stage emits fixed 200-frame windows that overlap by half. The acoustic stage decodes each window with the previous window's latent as a prompt, then crops the overlap back off so the concatenated waveform is seamless. All of that is pure integer arithmetic and lives here so it can be unit tested without a GPU.

ChunkWindow dataclass

One acoustic window, in AR frame coordinates.

end instance-attribute

end: int

index instance-attribute

index: int

is_first instance-attribute

is_first: bool

is_last instance-attribute

is_last: bool

length property

length: int

start instance-attribute

start: int

chunk_windows

chunk_windows(frames: int) -> list[ChunkWindow]

Return the fixed-size windows covering frames, overlapping by half.

A song shorter than one window produces a single short window; otherwise windows advance by AR_CHUNK_HOP_FRAMES and the final one is truncated at the end of the song.

crop_sample_bounds

crop_sample_bounds(window: ChunkWindow) -> tuple[int, int]

Return (left, right) waveform samples to trim from a decoded window.

The first window keeps its head and the last keeps its tail; every other window is cropped on both sides so that concatenating the survivors reconstructs the song exactly once.

overlap_mel_length

overlap_mel_length() -> int

Latent frames carried forward as the next window's flow-matching prompt.