heartmula

Generate full songs from lyrics and style tags using HeartMuLa music models.

Updated May 29, 2026
One-click install
npx skills add https://github.com/m4an5you6/aspera-agent --skill heartmula-m4an5you6
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: heartmula
Source: https://github.com/m4an5you6/aspera-agent/tree/main/skills/media/heartmula
Command: npx skills add https://github.com/m4an5you6/aspera-agent --skill heartmula-m4an5you6

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Generating complete songs with vocals from text requires either paid services like Suno or complex local model setups. This Skill guides the installation, patching, and execution of HeartMuLa, an open-source music foundation model that produces full songs locally from lyrics and tags. ## Core Features & Use Cases - Song Generation from Lyrics + Tags: Produce MP3 songs (48kHz stereo) conditioned on bracketed lyrics and comma-separated style tags using 3B/7B models. - VRAM-Constrained Operation: Run on GPUs with as little as 8GB VRAM via lazy loading, or split models across multiple GPUs. - Dependency & Source Patching: Includes required fixes for transformers 5.x RoPE cache initialization and HeartCodec checkpoint loading. - Use Case: A musician wants an open-source Suno alternative to prototype song ideas locally; provide lyrics with [Verse]/[Chorus] structure and tags like "piano,happy,wedding" to generate a 4-minute track in about 4 minutes. ## Quick Start Use the heartmula skill to generate a song from my lyrics file and the tags "rock,energetic,guitar" and save it as an MP3.

Frequently Asked Questions about heartmula

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate music from lyrics with HeartMuLa?▼

Clone the heartlib repository, install it in a Python 3.10 virtual environment, download the HeartMuLa checkpoints from Hugging Face, then run examples/run_music_generation.py with your lyrics file, tags file, and output path.

What GPU do I need for local AI song generation?▼

HeartMuLa requires a minimum of 8GB VRAM with lazy loading enabled, which peaks around 6.2GB for the 3B model. 16GB+ VRAM is recommended, and multi-GPU setups can split the language model and codec across devices.

Can HeartMuLa run on CPU or without an NVIDIA GPU?▼

Yes, CPU mode works via --mula_device cpu --codec_device cpu, but generation is extremely slow (30-60+ minutes per song) and needs 12GB+ RAM. Without a GPU, a cloud GPU service or the online demo is recommended.

Why does HeartMuLa fail after installing with transformers 5.x?▼

The pinned dependencies conflict with newer packages, and RoPE caches are skipped during meta-device loading. Upgrade datasets and transformers, then apply the RoPE reinitialization patch and add ignore_mismatched_sizes=True to HeartCodec loading calls.

What audio format and length does HeartMuLa output?▼

HeartMuLa outputs MP3 at 48kHz stereo, 128kbps. The default maximum length is 240 seconds (4 minutes), configurable via --max_audio_length_ms, with generation running at roughly real-time speed on GPU.