All models

AudioLDM2ProjectionModel

AudioLDM 2's conditioning projection, mapping CLAP and FLAN-T5 text embeddings into GPT-2's input sequence.

Audio and speech · 14 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (22 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
1.2M
Operations
14
Framework
PyTorch
Recurrent
No
Published
IEEE/ACM Transactions on Audio, Speech, and Language Processing (arXiv 2023)
Cited by
181 (as of 19 October 2026)
Authors
Haohe Liu, Yi Yuan, Xubo Liu and others
License
CC-BY-NC-SA-4.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m125
Graph hash
98f263b369dea903b5dc21d87b1fb3697875d72181226b47d791fc42876b3ca8
Skeleton hash
780ddb6894e43e85415f8cd124c42a47d47ef505b0700ab4fe6643803dc48e29
Architecture hash
e8ab21f4c9588f4a1bd8cd350a71175e85e9198b4c700090bedfd2f594f73a4b
Diagram SHA-256
bcb8546aa3cb0d48b21df26001cf52c4acd5f9317ee545949ba786defe64cd38
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

AudioLDM 2 is a framework for generating speech, music and sound effects with one learning method, built around a general intermediate representation its authors call the language of audio. Any audio clip can be translated into that representation with AudioMAE, a self-supervised pre-trained model, and the audio itself is produced by a latent diffusion model conditioned on it. A GPT-2 language model does the translating from whatever the user supplies, such as text, into the language of audio.

The graph traced here is only the conditioning front end that feeds GPT-2: a linear layer after each feature extractor brings its output to a common embedding dimension. For audio and music generation, the extractors are the CLAP text encoder and FLAN-T5. FLAN-T5 is there because CLAP, which produces a single global embedding, has trouble capturing the temporal information in a caption. The projected sequences are then joined end to end along the sequence axis to form the condition GPT-2 reads. Global encoders such as CLAP contribute a sequence of length one, so in the traced graph the single CLAP embedding sits beside the 128-token FLAN-T5 sequence.

GPT-2 is finetuned from its pre-trained weights with teacher forcing to regress the continuous AudioMAE vectors directly, with no discretization into tokens. The ablations back the two-encoder design: removing either CLAP or FLAN-T5 from the GPT-2 input degraded the evaluation metrics. Feeding raw text to GPT-2 instead of CLAP and FLAN-T5 features still worked, with an FAD of 2.11 and KL of 1.06, but the CLAP score dropped noticeably. Except for the phoneme encoder used for speech, the pre-trained feature extractors stay frozen during training. The GPT-2 they use has an embedding dimension of 768 and 12 transformer layers, which is the width this projection targets.

Key idea. AudioLDM 2 introduces the language of audio, a universal AudioMAE-based representation that lets the core latent diffusion model be pre-trained self-supervised without audio annotation and then driven by a GPT-2 that translates text or other conditions into it.

  • AudioLDM 2
  • AudioLDM2
  • AudioLDM2ProjectionModel
  • language of audio
  • LOA
  • text-to-audio
  • text-to-music
  • text-to-speech
  • latent diffusion
  • CLAP
  • FLAN-T5
  • GPT-2
  • AudioMAE
  • conditioning projection
  • cvssp/audioldm2

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{liu2024audioldm2learningholistic,
      title={AudioLDM 2: Learning Holistic Audio Generation with Self-supervised Pretraining}, 
      author={Haohe Liu and Yi Yuan and Xubo Liu and Xinhao Mei and Qiuqiang Kong and Qiao Tian and Yuping Wang and Wenwu Wang and Yuxuan Wang and Mark D. Plumbley},
      year={2024},
      eprint={2308.05734},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2308.05734}, 
}