declare-lab / mustango-pretrained

huggingface.co
Total runs: 13
24-hour runs: 0
7-day runs: 4
30-day runs: 2
Model's Last Updated: December 17 2023
text-to-audio

Introduction of mustango-pretrained

Model Details of mustango-pretrained

Mustango: Toward Controllable Text-to-Music Generation

Demo | Model | Website and Examples | Paper | Dataset

Hugging Face Spaces

Meet Mustango, an exciting addition to the vibrant landscape of Multimodal Large Language Models designed for controlled music generation. Mustango leverages Latent Diffusion Model (LDM), Flan-T5, and musical features to do the magic!

🔥 Live demo available on Replicate and HuggingFace .

Quickstart Guide

Generate music from a text prompt:

import IPython
import soundfile as sf
from mustango import Mustango

model = Mustango("declare-lab/mustango")

prompt = "This is a new age piece. There is a flute playing the main melody with a lot of staccato notes. The rhythmic background consists of a medium tempo electronic drum beat with percussive elements all over the spectrum. There is a playful atmosphere to the piece. This piece can be used in the soundtrack of a children's TV show or an advertisement jingle."

music = model.generate(prompt)
sf.write(f"{prompt}.wav", audio, samplerate=16000)
IPython.display.Audio(data=audio, rate=16000)
Installation
git clone https://github.com/AMAAI-Lab/mustango
cd mustango
pip install -r requirements.txt
cd diffusers
pip install -e .
Datasets

The MusicBench dataset contains 52k music fragments with a rich music-specific text caption.

Subjective Evaluation by Expert Listeners
Model Dataset Pre-trained Overall Match ↑ Chord Match ↑ Tempo Match ↑ Audio Quality ↑ Musicality ↑ Rhythmic Presence and Stability ↑ Harmony and Consonance ↑
Tango MusicCaps ✓ 4.35 2.75 3.88 3.35 2.83 3.95 3.84
Tango MusicBench ✓ 4.91 3.61 3.86 3.88 3.54 4.01 4.34
Mustango MusicBench ✓ 5.49 5.76 4.98 4.30 4.28 4.65 5.18
Mustango MusicBench ✗ 5.75 6.06 5.11 4.80 4.80 4.75 5.59
Training

We use the accelerate package from Hugging Face for multi-gpu training. Run accelerate config from terminal and set up your run configuration by the answering the questions asked.

You can now train Mustango on the MusicBench dataset using:

accelerate launch train.py \
--text_encoder_name="google/flan-t5-large" \
--scheduler_name="stabilityai/stable-diffusion-2-1" \
--unet_model_config="configs/diffusion_model_config_munet.json" \
--model_type Mustango --freeze_text_encoder --uncondition_all --uncondition_single \
--drop_sentences --random_pick_text_column --snr_gamma 5 \

The --model_type flag allows to choose either Mustango, or Tango to be trained with the same code. However, do note that you also need to change --unet_model_config to the relevant config: diffusion_model_config_munet for Mustango; diffusion_model_config for Tango.

The arguments --uncondition_all , --uncondition_single , --drop_sentences control the dropout functions as per Section 5.2 in our paper. The argument of --random_pick_text_column allows to randomly pick between two input text prompts - in the case of MusicBench, we pick between ChatGPT rephrased captions and original enhanced MusicCaps prompts, as depicted in Figure 1 in our paper.

Recommended training time from scratch on MusicBench is at least 40 epochs.

Model Zoo

We have released the following models:

Mustango Pretrained: https://huggingface.co/declare-lab/mustango-pretrained

Mustango: https://huggingface.co/declare-lab/mustango

Citation

Please consider citing the following article if you found our work useful:

@misc{melechovsky2023mustango,
      title={Mustango: Toward Controllable Text-to-Music Generation}, 
      author={Jan Melechovsky and Zixun Guo and Deepanway Ghosal and Navonil Majumder and Dorien Herremans and Soujanya Poria},
      year={2023},
      eprint={2311.08355},
      archivePrefix={arXiv},
}

Runs of declare-lab mustango-pretrained on huggingface.co

13
Total runs
0
24-hour runs
2
3-day runs
4
7-day runs
2
30-day runs

More Information About mustango-pretrained huggingface.co Model

More mustango-pretrained license Visit here:

https://choosealicense.com/licenses/apache-2.0

mustango-pretrained huggingface.co

mustango-pretrained huggingface.co is an AI model on huggingface.co that provides mustango-pretrained's model effect (), which can be used instantly with this declare-lab mustango-pretrained model. huggingface.co supports a free trial of the mustango-pretrained model, and also provides paid use of the mustango-pretrained. Support call mustango-pretrained model through api, including Node.js, Python, http.

mustango-pretrained huggingface.co Url

https://huggingface.co/declare-lab/mustango-pretrained

declare-lab mustango-pretrained online free

mustango-pretrained huggingface.co is an online trial and call api platform, which integrates mustango-pretrained's modeling effects, including api services, and provides a free online trial of mustango-pretrained, you can try mustango-pretrained online for free by clicking the link below.

declare-lab mustango-pretrained online free url in huggingface.co:

https://huggingface.co/declare-lab/mustango-pretrained

mustango-pretrained install

mustango-pretrained is an open source model from GitHub that offers a free installation service, and any user can find mustango-pretrained on GitHub to install. At the same time, huggingface.co provides the effect of mustango-pretrained install, users can directly use mustango-pretrained installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

mustango-pretrained install url in huggingface.co:

https://huggingface.co/declare-lab/mustango-pretrained

Url of mustango-pretrained

mustango-pretrained huggingface.co Url

Provider of mustango-pretrained huggingface.co

declare-lab
ORGANIZATIONS

Other API from declare-lab

huggingface.co

Total runs: 4.1K
Run Growth: 2.7K
Growth Rate: 64.99%
Updated:December 17 2023
huggingface.co

Total runs: 234
Run Growth: -323
Growth Rate: -138.03%
Updated:August 28 2025
huggingface.co

Total runs: 181
Run Growth: -194
Growth Rate: -107.18%
Updated:August 28 2025
huggingface.co

Total runs: 102
Run Growth: 47
Growth Rate: 46.08%
Updated:January 28 2025
huggingface.co

Total runs: 89
Run Growth: 27
Growth Rate: 30.34%
Updated:January 18 2026
huggingface.co

Total runs: 87
Run Growth: -13
Growth Rate: -14.94%
Updated:August 01 2025
huggingface.co

Total runs: 54
Run Growth: -4
Growth Rate: -7.41%
Updated:January 18 2026
huggingface.co

Total runs: 49
Run Growth: 0
Growth Rate: 0.00%
Updated:December 11 2025
huggingface.co

Total runs: 17
Run Growth: 2
Growth Rate: 11.76%
Updated:October 24 2022