Text Encode MiniMax Music 3
Your prompt is JSON, and the format is not negotiable
- clip
- CONDITIONING
- seconds
Music models don't take a sentence. MiniMax Music 3 wants a structured caption plus a lyrics block, and it wants them as a specific JSON shape. Text Encode MiniMax Music 3 [SML2] is the node that takes that JSON, validates it before anything expensive happens, and hands you conditioning plus the duration the model actually chose.
What it wraps
It's a thin, opinionated wrapper around ComfyUI's native MiniMaxMusic3TextEncode. Connect a MiniMax Music 3 clip, paste JSON into the multiline song_json field - or wire a STRING into it, which is how you'd drive it from a prompt-generating node - and out come CONDITIONING and seconds.
The seconds output is the interesting one. You set a maximum duration; the model decides whether to end earlier, and native code derives the actual length from the generated sequence. That float is what you feed a video/audio assembly step, or a filename template, so your track isn't padded to a guess.
MiniMax itself is the Shanghai lab behind the closed Hailuo video service - a full-stack multimodal shop that spent years API-first before opening H3's weights in August 2026. Music 3 sits in that same commercial lineage, which is why the prompt format is a schema rather than a vibe.
The JSON, exactly
Two strings and nothing else: caption and lyrics. The caption follows a fixed skeleton - it must begin with Global Metadata:, then carry Vocal Details: and Arrangement: on their own lines, in that order. Something like:
{
"caption": "Global Metadata: warm 1970s soul, 92 BPM, live drums and electric piano\nVocal Details: female lead, breathy delivery, close-mic'd, wide harmonies on the chorus\nArrangement: intro on keys, drums enter at bar 5, chorus lifts with strings, fade outro",
"lyrics": "[Verse]\nStreetlight on the pavement, cold coffee in my hand\n[Chorus]\nWe were always leaving, we just never named the plan"
}
Lyrics carry your sung text and section tags; an empty string is legitimate and gets you an instrumental. An enclosing JSON code fence is tolerated, and the encoder validates the format identically whether you typed it or a node produced it.
That consistency is worth more than it sounds. Dynamic prompt expansion is disabled specifically so the JSON and your literal lyric text survive intact - you don't want a prompt-expansion pass rewriting a chorus.
The other four inputs
seed (default 0), max_duration (default 120 seconds, 0.04–360, step 0.04), cfg_scale (default 1.5) and top_k (default 50). All forwarded unchanged to native code. max_duration is a ceiling, not a promise - the model can end earlier, which is why seconds exists as an output rather than being assumed.
Installing it
ComfyUI Manager → search Smart Model Loader Nova, or:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_SmartModelLoader_Nova.git
cd ComfyUI_SmartModelLoader_Nova
python -m pip install -r requirements.txt
ComfyUI's Python environment, restart, then Add Node → 🌒 Smart Model Loader Nova → Conditioning. No extra dependencies - this is a validator plus argument forwarding. Your MiniMax Music 3 encoder and audio VAE are separate downloads; the audio VAE goes in models/vae, where VAE Loader Video+Audio can pick it up.
Where people get burned
Missing native support. If your ComfyUI build doesn't have MiniMaxMusic3TextEncode, execution reports an update-needed error. The node registers anyway, so the failure arrives at run time, not at load. Not a pack bug; a stale install.
Caption structure. The three headers and their order are enforced. A caption that reads beautifully but starts with "warm soul, 92bpm" fails validation, and the message points at the format rather than at your taste.
Extra keys. "Exactly two strings" is meant literally. Adding a style or bpm field to help the model doesn't help - it fails the check.
Empty song_json. Validation runs before encoding either way, so an empty field errors instead of generating silence. If you wanted an instrumental, that's an empty lyrics string inside valid JSON, not an empty node.
No audio VAE, no sound. This node gets you conditioning. Decoding needs the audio VAE loaded; the pack's VAE Loader Video+Audio is the natural partner, and its audio_vae slot quietly returns None if you skipped it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| song_json | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
| max_duration | FLOAT | 120.000.04–360 | Maximum duration in seconds; the model can end the song earlier. |
| cfg_scale | FLOAT | 1.50–100 | — |
| top_k | INT | 501–16384 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |
| seconds | FLOAT | — |