Downloads · 30 days
47
0% of all-time downloads
nateraw/musicgen-songstarter-v0.2
musicgen-songstarter-v0.2 is a text-to-audio model from nateraw. Use it for the text-to-audio task on the model card, and read the license before you ship it in a product. It is set up for audiocraft. The card lists the license as cc-by-nc-4.0.
[](https://replicate.com/nateraw/musicgen-songstarter-v0.2) [](https://colab.research.google.com/gist/nateraw/0cb4c242b70af10044e9ae73f4617c86/songstarter-v0-2-demo.ipynb) [](https://huggingface.co/spaces/nateraw/sing…
Downloads · 30 days
47
0% of all-time downloads
All-time downloads
113K
Public
Repo size
9.9 GB
Likes
171
Public
Click a slice to open those files.
.bin9.9 GB · 100%
From the Hugging Face model README
musicgen-songstarter-v0.2 is a musicgen-stereo-melody-large fine-tuned on a dataset of melody loops from my Splice sample library. It's intended to be used to generate song ideas that are useful for music producers. It generates stereo audio in 32khz.
👀 Update: I wrote a blogpost detailing how and why I trained this model, including training details, the dataset, Weights and Biases logs, etc.
Compared to musicgen-songstarter-v0.1, this new version:
medium ➡️ large transformer LMIf you find this model interesting, please consider:
Install audiocraft:
pip install -U git+https://github.com/facebookresearch/audiocraft#egg=audiocraft
Then, you should be able to load this model just like any other musicgen checkpoint here on the Hub:
import torchaudio
from audiocraft.models import MusicGen
from audiocraft.data.audio import audio_write
model = MusicGen.get_pretrained('nateraw/musicgen-songstarter-v0.2')
model.set_generation_params(duration=8) # generate 8 seconds.
wav = model.generate_unconditional(4) # generates 4 unconditional audio samples
descriptions = ['acoustic, guitar, melody, trap, d minor, 90 bpm'] * 3
wav = model.generate(descriptions) # generates 3 samples.
melody, sr = torchaudio.load('./assets/bach.mp3')
# generates using the melody from the given audio and the provided descriptions.
wav = model.generate_with_chroma(descriptions, melody[None].expand(3, -1, -1), sr)
for idx, one_wav in enumerate(wav):
# Will save under {idx}.wav, with loudness normalization at -14 db LUFS.
audio_write(f'{idx}', one_wav.cpu(), model.sample_rate, strategy="loudness", loudness_compressor=True)
Follow the following prompt format:
{tag_1}, {tag_2}, ..., {tag_n}, {key}, {bpm} bpm
For example:
hip hop, soul, piano, chords, jazz, neo jazz, G# minor, 140 bpm
For some example tags, see the prompt format section of musicgen-songstarter-v0.1's readme. The tags there are for the smaller v1 dataset, but should give you an idea of what the model saw.
For more verbose details, you can check out the blogpost.
This work would not have been possible without:
Thank you ❤️