File size: 2,116 Bytes
6088500
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
license: mit  # Changed to lowercase
language: en  # Changed to ISO 639-1 code
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},
}
```