Downloads · 30 days
28
11% of all-time downloads
motiftechnologies/stable-audio-3-maqam-lora
stable-audio-3-maqam-lora is a machine learning model from motiftechnologies. Use it for the machine learning 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 other.
A LoRA fine-tune of Stable Audio 3 Medium (1.4B parameters) specialized in Arabic Maqam music generation.
Downloads · 30 days
28
11% of all-time downloads
All-time downloads
256
Public
Repo size
585 MB
Likes
0
Public
Click a slice to open those files.
.safetensors293 MB · 100%
From the Hugging Face model README
A LoRA fine-tune of Stable Audio 3 Medium (1.4B parameters) specialized in Arabic Maqam music generation.
import torch
import torchaudio
from stable_audio_tools import get_pretrained_model
from stable_audio_tools.inference.generation import generate_diffusion_cond_inpaint
from peft import PeftModel
# Load base model
model, model_config = get_pretrained_model("stabilityai/stable-audio-3-medium")
model = model.cuda()
# Load LoRA adapter
model.model.model = PeftModel.from_pretrained(
model.model.model,
"motiftechnologies/stable-audio-3-maqam-lora"
)
model.model.model.merge_and_unload()
model = model.eval()
# Generate
with torch.no_grad():
audio = generate_diffusion_cond_inpaint(
model,
steps=50,
cfg_scale=6.0,
conditioning=[{"prompt": "Maqam Bayati on <oud>, <qanun>, <ney>; slow tempo; taqsim form", "seconds_total": 30}],
sample_size=44100 * 30,
device="cuda",
inpaint_mask=torch.zeros(1, 44100 * 30, device="cuda"),
)
torchaudio.save("output.wav", audio.squeeze(0).cpu(), 44100)
Fine-tuned by Motif Technologies.