Neural music and sound generation architectures in production have diverged into two competing paradigms: discrete autoregressive sequence modeling and continuous latent diffusion. While early research relied on cascaded pipelines with separate acoustic and semantic models, modern open-source systems unify generation into single-stage or dual-stage foundations capable of synthesizing high-fidelity instrumentals, sound effects, and full polyphonic songs with vocals.
Deploying generative audio in production requires navigating strict tradeoffs between generation length, sample rate, steering precision, inference latency, and memory bandwidth consumption. Four prominent open-source foundation models represent distinct approaches across these dimensions: Meta's MusicGen, Stability AI's Stable Audio Open, University of Surrey and ByteDance's AudioLDM 2, and the HKUST/M-A-P consortium's YuE.
Architectural Foundations
Each framework adopts a distinct pipeline to compress raw audio waveforms and model temporal dependencies across musical time scales.

Meta MusicGen: Single-Stage Autoregressive Transformer
MusicGen eliminates cascaded semantic-to-acoustic generation by operating directly on multi-codebook discrete tokens produced by Meta's EnCodec neural audio codec. Standard Residual Vector Quantization (RVQ) generates multiple parallel codebook indices per time step. Naive autoregression across codebooks requires generating tokens per audio frame, expanding sequence length by a factor of .
MusicGen resolves this sequence explosion through an interleaved delay pattern. By shifting codebook streams relative to one another by one time step, a single autoregressive Transformer predicts codebooks in parallel at each step while maintaining cross-codebook causal conditioning. Text conditioning is injected via cross-attention over pre-trained T5 embeddings, while melody conditioning feeds quantized chromagram representations as prefix tokens to the transformer decoder.
Stability AI Stable Audio Open: Timing-Conditioned Latent Diffusion
Stable Audio Open 1.0 utilizes a continuous latent diffusion architecture operating over a non-causal continuous Variational Autoencoder (VAE). Instead of quantizing audio into discrete tokens, the convolutional VAE compresses 44.1 kHz stereo audio by a factor of 4096 into continuous 64-channel latent vectors at approximately 10.76 Hz.
The core generative engine is a 1.2 billion parameter Diffusion Transformer (DiT). The DiT performs denoising over latent trajectories conditioned on two signals: natural language embeddings extracted from a frozen T5-base encoder, and continuous timing embeddings specifying both total requested duration and playback start seconds. This explicit timing mechanism enables variable-length generation up to 47 seconds without padding or window truncation artifacts.
AudioLDM 2: Language-of-Audio Semantic Bridging
AudioLDM 2 introduces a hybrid semantic-diffusion paradigm built on a shared intermediate representation termed the Language of Audio (LOA). Rather than mapping text directly to audio latents, AudioLDM 2 bridges modalities via self-supervised representations derived from AudioMAE.
The generation pipeline operates in two sequential stages:
- A GPT-2 style language model autoregressively predicts sequence tokens representing AudioMAE features, conditioned on joint text embeddings from CLAP and Flan-T5.
- A continuous latent diffusion model denoises mel-spectrogram latents conditioned on the predicted LOA sequence, which are subsequently inverted to 16 kHz or 48 kHz audio waveforms using a HiFi-GAN vocoder.
This decoupling enables AudioLDM 2 to handle heterogeneous audio domains including sound effects, Foley, speech, and instrumental music within a single unified checkpoint.
HKUST/M-A-P YuE: Dual-Stage Full-Song Foundation Model
YuE is an open foundation model specifically designed for full-song, lyrics-to-music generation spanning up to five minutes. Built on top of the LLaMA-2 architecture and trained on over a trillion tokens, YuE addresses dense polyphony and vocal-instrumental interference through a track-decoupled, two-stage language modeling framework.
Stage 1 employs a 7B parameter autoregressive Transformer that consumes structured lyrics and genre prompts to generate coarse, semantic-rich audio tokens from the base codebook (Codebook-0) of a residual vector quantizer. Crucially, YuE decouples the vocal track and instrumental accompaniment into parallel token streams during next-token prediction, preventing vocal formants from being masked by dense backing tracks. Stage 2 utilizes a secondary 7B autoregressive model to predict the remaining fine-grained acoustic codebooks conditioned on Stage 1 tokens, reconstructing complete multi-stem musical arrangements.
Tokenization and Latent Compression
The representation layer determines the mathematical boundary between acoustic reconstruction fidelity and sequence modeling tractability.

+-------------------+---------------------+--------------------+--------------------+
| Model | Representation Type | Base Sampling Rate | Latent Frame Rate |
+-------------------+---------------------+--------------------+--------------------+
| MusicGen | Discrete RVQ Tokens | 32.0 kHz Mono | 50.0 Hz (4 books) |
| Stable Audio Open | Continuous VAE | 44.1 kHz Stereo | ~10.76 Hz (64 ch) |
| AudioLDM 2 | LOA + Mel Latents | 16.0 kHz / 48 kHz | ~21.5 Hz |
| YuE | Semantic/Acoustic | 44.1 kHz Dual Stem | 25.0 Hz - 50.0 Hz |
+-------------------+---------------------+--------------------+--------------------+Discrete Codec Vector Quantization
MusicGen relies on EnCodec configured with 4 codebooks sampled at 50 Hz. Each second of 32 kHz audio maps to 200 discrete integer tokens. Because EnCodec applies neural vector quantization with adversarial and multi-scale STFT losses, phase details are preserved without phase vocoders. However, discrete codebooks introduce quantization noise at low bitrates and restrict acoustic fidelity strictly to the codec's training distribution.
YuE adopts a specialized semantic-acoustic fused tokenizer. Its base level captures linguistic intelligibility and melodic pitch trajectories (optimized for singing voice synthesis), while higher-order residual levels encode timbre, stereo panning, and reverberation details.
Continuous Latent Autoencoders
Stable Audio Open replaces discrete vector quantization with an unquantized convolutional autoencoder with a soft-normalization bottleneck. Operating at 44.1 kHz in true stereo, the autoencoder provides a continuous representation space that avoids codebook collapse and out-of-vocabulary artifacts. The 4096x temporal downsampling compresses 47 seconds of stereo audio (over 2 million raw samples) into approximately 506 latent steps across 64 channels, allowing standard attention mechanisms in the DiT to operate over modest context lengths.
AudioLDM 2 operates over 64-band log mel-spectrograms compressed through a Spatial VAE downsampled by a factor of 4. Mel-spectrogram compression discards phase information, shifting phase reconstruction burdens to the HiFi-GAN neural vocoder during post-processing.
Controllability and Conditioning Mechanisms
Production deployments require precise steering across musical key, tempo, structure, duration, and semantic style.
+-------------------+-------------------------+----------------------+--------------------+
| Model | Text Conditioning | Musical Guidance | Temporal Control |
+-------------------+-------------------------+----------------------+--------------------+
| MusicGen | T5 / Flan-T5 Embeddings | Melodic Chromagram | Fixed / Auto-slide |
| Stable Audio Open | T5-base Embeddings | Prompt Metadata | Explicit Seconds |
| AudioLDM 2 | CLAP + Flan-T5 | Audio In-Painting | Duration Tokens |
| YuE | Genre/Tag Metadata | Structured Lyrics | Section Headers |
+-------------------+-------------------------+----------------------+--------------------+Text and Attribute Conditioning
MusicGen processes textual descriptions using T5 encoder states projected into the cross-attention layers of its autoregressive decoder. It supports prompt attributes such as instruments, tempo (BPM), and musical genre.
Stable Audio Open utilizes T5-base text embeddings pooled across token lengths and cross-attended throughout the DiT blocks. Its primary operational advantage is duration conditioning: passing explicit seconds_start and seconds_total values guarantees that generated tracks conclude with natural reverb decays rather than abrupt mid-phrase cutoffs.
Melodic and Structural Steering
MusicGen Melody accepts an auxiliary audio prompt, extracts a 12-dimensional chromagram representing pitch class distribution over time, and injects this tensor into the Transformer. The model generates new instrumentations and arrangements that follow the exact harmonic and melodic progression of the reference audio.
YuE provides granular structural steering through formatted lyric sheets. Users demarcate musical sections using explicit metadata tags such as [verse], [chorus], [bridge], and [outro]. The Stage-1 language model aligns syllable durations with rhythm cadences while dynamically coordinating vocal onset against accompaniment tracks.
Inference Latency and Serving Economics
Inference cost profiles differ fundamentally between token-by-token autoregression and iterative diffusion denoising.
Autoregressive Serving Bottlenecks
Autoregressive models like MusicGen and YuE execute one forward pass per time step (or codebook group). For a 30-second audio clip at 50 Hz, MusicGen computes 1,500 sequential autoregressive steps. While key-value (KV) caching eliminates redundant prefix computations, generation remains bound by GPU memory bandwidth during sequential decoding.
YuE's two-stage 7B pipeline compounds these compute requirements. Generating a full 3-minute song requires generating thousands of text, vocal, and accompaniment tokens across Stage 1, followed by a second autoregressive pass in Stage 2. Full-song synthesis typically demands dedicated data-center GPUs (such as an NVIDIA A100 or H100 with 80GB VRAM) and can take 2 to 5 minutes of compute time per track.
Latent Diffusion Throughput
Latent diffusion models convert sequential temporal dependency into a fixed number of denoising steps over parallel spatial dimensions. Stable Audio Open computes generation trajectories using ordinary differential equation (ODE) solvers such as DPM-Solver++ or Euler ancestral sampling across 50 to 100 evaluation steps.
Because the entire latent grid is updated in parallel during each diffusion step, computation is compute-bound rather than memory-bandwidth-bound. On a single NVIDIA RTX 4090 (24GB VRAM), Stable Audio Open synthesizes a 47-second 44.1 kHz stereo track in under 3 seconds, achieving real-time factors (RTF) well below 0.1.
+-------------------+---------------------+--------------------+--------------------+
| Model | Checkpoint Sizes | Minimum VRAM | Inference RTF |
+-------------------+---------------------+--------------------+--------------------+
| MusicGen | 300M, 1.5B, 3.3B | 6 GB - 16 GB | ~0.3 - 0.8 |
| Stable Audio Open | 1.21B (DiT + VAE) | 8 GB - 12 GB | ~0.05 - 0.15 |
| AudioLDM 2 | 1.1B (GPT2 + LDM) | 8 GB - 12 GB | ~0.10 - 0.25 |
| YuE | 7B + 7B Dual-Stage | 24 GB - 48 GB | ~1.0 - 2.5 |
+-------------------+---------------------+--------------------+--------------------+Architectural Tradeoffs and Selection Criteria
Choosing an audio foundation model for production infrastructure depends on specific functional requirements:
- Short Instrumental Loops, Stems, and Melody Transfer: Meta MusicGen is the optimal choice when applications require conditioning on existing melodic lines or generating short, looping musical phrases with tight rhythmic quantization.
- Low-Latency Sound Effects and Stereo Production: Stability AI Stable Audio Open delivers the highest acoustic fidelity (44.1 kHz stereo) with sub-second diffusion latency, making it suited for real-time sound design and background music generation up to 47 seconds.
- General Audio and Environmental Soundscapes: AudioLDM 2 provides the broadest multi-modal coverage across Foley, speech-like acoustics, and complex atmospheric sound effects.
- Full-Length Songwriting with Vocals: YuE is currently the only open-weight architecture capable of end-to-end lyrics-to-singing generation across multi-minute song structures with distinct vocal and accompaniment stems.
Sources
- Simple and Controllable Music Generation (MusicGen)
- Stable Audio Open: Fast Timing-Conditioned Latent Audio Diffusion
- AudioLDM 2: Learning Holistic Audio Generation with Self-supervised Pretraining
- YuE: Scaling Open Foundation Models for Long-Form Music Generation
- High-Fidelity Neural Audio Compression (EnCodec)
- AudioCraft Repository (Meta AI)
- Stable Audio Tools (Stability AI)
