Downloads · 30 days
11
15% of all-time downloads
sathyavgc/saraga-dreambooth-musicgen
saraga-dreambooth-musicgen is a text-to-audio model from sathyavgc. 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 peft. The card lists the license as cc-by-nc-4.0.
Fine-tuned facebook/musicgen-small using audio DreamBooth with LoRA adapters on the Saraga dataset.
Downloads · 30 days
11
15% of all-time downloads
All-time downloads
72
Public
Repo size
25.2 MB
Likes
0
Public
Click a slice to open those files.
.safetensors25.2 MB · 91%
From the Hugging Face model README
Fine-tuned facebook/musicgen-small using audio DreamBooth with LoRA adapters on the Saraga dataset.
The model binds two special identity tokens to specific instrument timbres from the Saraga Carnatic music collection:
| Token | Bound Instrument |
|---|---|
sks0 | Flute (Saraga Carnatic timbre) |
sks1 | Veena (Saraga Carnatic timbre) |
Use these tokens in your prompt to trigger the learned timbres.
from transformers import AutoProcessor, MusicgenForConditionalGeneration
from peft import PeftModel
import torch, soundfile as sf
processor = AutoProcessor.from_pretrained("YourUsername/saraga-dreambooth-musicgen")
base_model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small")
model = PeftModel.from_pretrained(base_model, "YourUsername/saraga-dreambooth-musicgen")
model = model.to("cuda").eval()
inputs = processor(text=["sks0 Calm, Carnatic, Flute"], return_tensors="pt").to("cuda")
with torch.no_grad():
audio = model.generate(**inputs, max_new_tokens=512, guidance_scale=5.0)
sf.write("output.wav", audio[0, 0].cpu().numpy(), samplerate=32000)
| Parameter | Value |
|---|---|
| Base model | facebook/musicgen-small |
| Method | Audio DreamBooth + LoRA |
| LoRA rank (r) | 32 |
| LoRA alpha | 64 |
| Target modules | q_proj, v_proj |
| Dataset | DevPanda004/saraga (90 clips) |
| Sample rate | 32000 Hz |
| Clip length | ~15 seconds |
| Epochs | 50 |
| Optimizer | AdamW + CosineAnnealingLR |
| Training loss | Instance loss + Prior loss |
sks0 Calm, Carnatic, Flutesks0 Hindustani — tests if timbre survives style changesks token to hear the generic base model outputsks tokens are arbitrary — only meaningful with this specific adaptermusicgen-small; larger base models may produce better qualityCC-BY-NC-4.0 — free for non-commercial use with attribution.