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 ¶
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.