Skip to content

Latest commit

Β 

History

History
69 lines (55 loc) Β· 2.22 KB

File metadata and controls

69 lines (55 loc) Β· 2.22 KB

Models

Magenta RealTime 2 comprises three components:

  1. MusicCoCa: a text / audio style embedding model
  2. SpectroStream: a codec model for audio encoding and decoding
  3. Depthformer: a transformer-based model that generates SpectroStream tokens

Hardware requirements

MRT2 offers two model sizes:

  • mrt2_small (230M parameters) β€” runs real-time on any Apple Silicon Mac, including Air models.
  • mrt2_base (2.4B parameters) β€” higher quality; requires a Pro/Max chip for real-time streaming.

The table below shows which devices support real-time streaming (generating audio faster than playback):

Device mrt2_small (230M) mrt2_base (2.4B)
M5 Max βœ… βœ…
M3 Max βœ… βœ…
M2 Max βœ… βœ…
M4 Pro βœ… βœ…
M2 Pro βœ… ❌
M1 Pro βœ… ❌
M4 Air βœ… ❌
M3 Air βœ… ❌
M1 Air βœ… ❌

Download models

Use the mrt models CLI to fetch models (automatically saved in ~/Documents/Magenta/magenta-rt-v2/)

# Download resource models:
# MusicCoCa and SpectroStream
mrt models init

# Download Depthformer models
# exported in mlxfn format
mrt models download

Expected directory layout:

~/Documents/Magenta/magenta-rt-v2/
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ musiccoca/
β”‚   β”‚   β”œβ”€β”€ audio_preprocessor.tflite
β”‚   β”‚   β”œβ”€β”€ music_encoder.tflite
β”‚   β”‚   β”œβ”€β”€ pretrained_vector_quantizer.tflite
β”‚   β”‚   β”œβ”€β”€ spm.model
β”‚   β”‚   └── text_encoder.tflite
β”‚   └── spectrostream/
β”‚       β”œβ”€β”€ spectrostream_encoder.mlxfn
β”‚       β”œβ”€β”€ decoder.safetensors
β”‚       β”œβ”€β”€ encoder.safetensors
β”‚       └── quantizer.safetensors
β”œβ”€β”€ models/
β”‚   └── <model_name>/
β”‚       β”œβ”€β”€ <model_name>.mlxfn
β”‚       └── <model_name>_state.safetensors
└── checkpoints/
    └── <model_name>.safetensors

Download raw checkpoints

One may find raw model checkpoints (safetensors before exporting to mlxfn) useful for research purposes. Thus we offer them via mrt checkpoints download CLI.