|
--- |
|
license: mit |
|
language: en |
|
base_model: facebook/musicgen-medium |
|
pipeline_tag: text-to-audio |
|
tags: |
|
- audio |
|
- music-generation |
|
- text-to-music |
|
- musicgen |
|
- transformers |
|
library_name: transformers |
|
metrics: |
|
- type: audio_quality |
|
value: "32000" |
|
name: sample_rate |
|
- type: generation_length |
|
value: "30" |
|
name: max_duration_seconds |
|
datasets: [] |
|
--- |
|
|
|
# MelodyMaster V1 |
|
|
|
MelodyMaster V1 is an AI music generation model based on Meta's MusicGen-medium architecture. It generates high-quality music from text descriptions. |
|
|
|
## Model Description |
|
|
|
- **Model Architecture:** MusicGen (3.3B parameters) |
|
- **Base Model:** facebook/musicgen-medium |
|
- **Task:** Text-to-Music Generation |
|
- **Output:** 32kHz audio samples |
|
- **Max Duration:** 30 seconds |
|
|
|
## Usage |
|
|
|
```python |
|
from transformers import AutoProcessor, MusicgenForConditionalGeneration |
|
|
|
# Load model and processor |
|
model = MusicgenForConditionalGeneration.from_pretrained("opentunesai/melodymasterv1") |
|
processor = AutoProcessor.from_pretrained("opentunesai/melodymasterv1") |
|
|
|
# Process text and generate music |
|
inputs = processor( |
|
text=["happy rock song with electric guitar"], |
|
padding=True, |
|
return_tensors="pt", |
|
) |
|
|
|
audio_values = model.generate(**inputs, max_new_tokens=1500) |
|
``` |
|
|
|
## Example Prompts |
|
|
|
- "An upbeat electronic dance track with a strong beat" |
|
- "A peaceful piano melody with soft strings" |
|
- "A rock song with electric guitar and drums" |
|
- "Jazz trio with piano, bass and drums" |
|
|
|
## Demo |
|
|
|
Try the model in our [Gradio Demo Space](https://huggingface.co/spaces/opentunesai/melodymasterv1-demo) |
|
|
|
## License |
|
|
|
Apache 2.0 |
|
|
|
## Acknowledgments |
|
|
|
Based on Meta's MusicGen model. Original model card: [facebook/musicgen-medium](https://huggingface.co/facebook/musicgen-medium) |
|
|
|
## Citation |
|
|
|
```bibtex |
|
@article{copet2023simple, |
|
title={Simple and Controllable Music Generation}, |
|
author={Jade Copet and Felix Kreuk and Itai Gat and Tal Remez and David Kant and Gabriel Synnaeve and Yossi Adi and Alexandre Défossez}, |
|
year={2023}, |
|
journal={arXiv preprint arXiv:2306.05284}, |
|
} |
|
``` |