HeartMuLa Music Generator
Running HeartMuLa inside ComfyUI
- model
- tokens
The HeartMuLa Music Generator is the closest thing ComfyUI has to a song button. You paste in lyrics, toss in a few style tags, and the node renders an actual 48 kHz audio file locally - no API key, no cloud subscription. It turns ComfyUI into something it mostly wasn't before: a place where the graph's output is audio instead of pixels.
The name is the whole pitch. HeartMuLa is a family of open music foundation models - a 3B autoregressive model plus a neural audio codec - and CRT-HeartMuLa is a single-node wrapper around the official HeartLib library. The author, CRYPT_EXE - the same person behind the CRT-Nodes utility pack - published it through ComfyUI Manager, so it installs like any other custom node. The pack's honest about what it is: the author himself rates the output "OK, inferior to Suno." Inferior to Suno, sure, but it's local, it's free, and it lives inside a workflow you already have.
How it works
Under the hood it's a two-stage pipeline. The HeartMuLa-3B transformer generates audio tokens one frame at a time - 80 ms chunks, autoregressively, up to whatever max_audio_length_seconds you set. Then HeartCodec, an EnCodec-style neural codec, decodes those tokens into a 48 kHz waveform. Genre and style following come from classifier-free guidance, which is what the cfg_scale widget controls.
You pick between two model versions: HeartMuLa-RL-oss-3B-20260123 (the recommended default - a reinforcement-learning-tuned checkpoint) and the plainer HeartMuLa-oss-3B. On first run the node auto-downloads the model stack from Hugging Face into ComfyUI/models/HeartMula/ - several gigabytes, so the first run is slow. auto_download is on by default, and models cache once they're there.
The inputs that actually matter
The node ships with a lot of widgets, but a beginner really sets three things:
lyrics- a multiline block, ideally structured with[Verse],[Chorus],[Bridge]markers like the built-in example. This is the one thing the model nails; people report it "almost never misses lyrics."tags- a comma-separated style list (piano,happy,wedding,synthesizer,romanticis the default). Think of it as the positive prompt. It's also the weak spot - more on that below.max_audio_length_seconds- 10 to 600, default 60. Each 80 ms frame is generated one at a time, so longer means much slower, not just much more.
After that: temperature, top_k, cfg_scale, and seed behave like you'd expect from diffusion-land, and mula_dtype lets you drop the main model to 4bit if you're VRAM-tight (roughly 8 GB vs 12 GB for bf16 at 60 seconds). keep_model_loaded defaults to off so the model unloads after each run.
The optional lyrics_override, tags_override, and seed_override are the interesting part for workflow builders - they take wire inputs, so another node (an LLM lyric writer, a randomizer) can drive the song.
The single audio output is ComfyUI's standard AUDIO type - a dict with a waveform tensor and a 48000 sample_rate - so it plugs into audio save nodes and mixers. You also get a custom UI: in-node player, waveform, live Peak/RMS/LUFS readouts, plus a disk write if save_output is on.
Installing it
ComfyUI Manager is the easy path: search "CRT-HeartMuLa" and hit install. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/PGCRT/CRT-HeartMuLa
pip install -r requirements.txt
then restart ComfyUI. The pack's own install.py pulls heartlib with --no-deps so it doesn't fight your existing torch install. One heads-up: the README's clone snippet literally says yourusername - a placeholder that will clone nothing. Use the Manager or the real PGCRT URL above.
Where people get burned
- "HeartLib import failed" on startup. Early builds of this pack shipped an unpinned
xformersthat could drag a CPU build of torch into your environment. The author removed it, but if you installed during that window, the fix is reinstalling a proper GPU torch (e.g.torch 2.9.1+cu130) and the pack. - It's slow. Roughly 90 seconds to generate a 60-second track on a 4090 - the cost of autoregressive generation, with 4-bit adding a bit more time to save VRAM. Budget accordingly.
- The tags are finicky. The community's single biggest complaint is that genre tags get ignored - until people realized you actually have to set
cfg_scale; with the wrong settings the classifier guidance effectively zeros out. Some tracks also come out with a plasticky MIDI timbre, and instrumental-only output basically isn't on the table - the model is rooted in TTS, so it wants to sing. - Licensing. HeartMuLa shipped under CC-BY-NC and was later re-licensed to Apache 2.0, per the HeartLib repo. Fine for tinkering, worth checking before you monetize your wedding-hit generator.
Set expectations and it's a genuinely fun node: iterate on lyrics inside a graph, score a video with a local track, or just prove ComfyUI isn't only about images anymore. Just don't expect to retire Suno's subscription off the first run.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | HEARTMULA_MODEL | — | |
| lyrics | STRING | — | |
| tags | STRING | — | |
| duration_seconds | FLOAT | 30.001–300 | — |
| seed | INT | 00–18446744073709550000 | — |
| temperature | FLOAT | 1.000.1–2 | — |
| top_k | INT | 501–1000 | — |
| cfg_scale | FLOAT | 1.500.1–5 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tokens | HEARTMULA_TOKENS | — |