Views
No views yet
| Checkpoint | Training Steps | Audio conditioning | CLAP audio dim | UNet dim | Params |
|---|---|---|---|---|---|
| audioldm-s-full | 1.5M | No | 768 | 128 | 421M |
| audioldm-s-full-v2 | > 1.5M | No | 768 | 128 | 421M |
| audioldm-m-full | 1.5M | Yes | 1024 | 192 | 652M |
| audioldm-l-full | 1.5M | No | 768 | 256 | 975M |
pip install --upgrade diffusers transformers accelerate1from diffusers import AudioLDMPipeline
2import torch
3
4repo_id = "cvssp/audioldm-m-full"
5pipe = AudioLDMPipeline.from_pretrained(repo_id, torch_dtype=torch.float16)
6pipe = pipe.to("cuda")
7
8prompt = "Techno music with a strong, upbeat tempo and high melodic riffs"
9audio = pipe(prompt, num_inference_steps=10, audio_length_in_s=5.0).audios[0]1import scipy
2
3scipy.io.wavfile.write("techno.wav", rate=16000, data=audio)1from IPython.display import Audio
2
3Audio(audio, rate=16000)num_inference_steps argument: higher steps give higher quality audio at the expense of slower inference.audio_length_in_s argument.@article{liu2023audioldm,
title={AudioLDM: Text-to-Audio Generation with Latent Diffusion Models},
author={Liu, Haohe and Chen, Zehua and Yuan, Yi and Mei, Xinhao and Liu, Xubo and Mandic, Danilo and Wang, Wenwu and Plumbley, Mark D},
journal={arXiv preprint arXiv:2301.12503},
year={2023}
}