Nodes/JK HeartMuLa (Style Transfer)/HeartMuLa Tag Builder
ComfyUI Node

HeartMuLa Tag Builder

The prompt box that keeps your tags honest

By Crono141·Created 3 months ago·Updated 3 months ago· 0
HeartMuLa Tag Builder
    • tags
    genre
    mood
    instrument
    temponone
    vocal
    eranone
    production
    additional_tags

    ComfyUI has a hundred "tag builder" nodes and ninety-nine of them are for image prompts. HeartMuLa Tag Builder is the one for music - and it exists because the plain tags box on the Music Generator is a leaky way to steer a model that, frankly, already has genre-tag obedience problems. This node keeps your tags structured and clean so you're not debugging "why does it sound like nothing I asked for" when the actual culprit is a typo'd, duplicated, mixed-case tag string.

    It's one of the genuinely new pieces in this fork - the pack's own creation, with the concept inspired by the RT-HeartMuLa pack but reimplemented from scratch. The idea is simple: instead of one free-text box, you get categories, because a song prompt is really several dimensions and humans forget the boring ones.

    What it does

    Seven category fields feed one comma-joined tag string:

    • genre, mood, instrument, vocal, production - free-text fields, each with a tooltip full of suggestions (pop/rock/house/techno, uplifting/melancholic/dark, piano/808 bass, and so on). Type anything comma-separated; the suggestions are hints, not a fixed vocabulary.
    • tempo and era - single-pick dropdowns (very slow → driving, 1960s → futuristic), default none.
    • additional_tags (optional, multiline) - the catch-all for anything the fields above don't cover.

    Output is a single tags STRING that goes straight into the Music Generator's tags input. The important behavior is what it does to your text: splits on commas, lowercases, strips whitespace, de-duplicates (first occurrence wins), and drops blanks and none. So a messy "Synthwave, synthwave, 1980s" becomes the clean synthwave, 1980s the model can actually work with.

    Why the cleaning matters

    HeartMuLa's tag conditioning is literal and comma-delimited. Duplicates and inconsistent casing don't crash anything, but they waste conditioning capacity on noise - and with a model whose tag adherence is already the weak spot (the community's #1 complaint at launch), you want every token earning its keep. The de-dup and lowercase normalization is the difference between "I typed a mess" and "I gave the model a clean spec." One light aside: this won't magically fix the model ignoring your tags - that's a cfg_scale problem, covered in the Music Generator article - but it removes the "my tags were garbage" variable from the debugging session.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/Crono141/ComfyUI-JK-HeartMuLa.git
    cd ComfyUI-JK-HeartMuLa
    pip install -r requirements.txt
    

    Restart ComfyUI and it appears under JK-HeartMuLa. It's a pure string-processing node - no models, no VRAM, no GPU. You can use it on CPU-only rigs and it'll be instant.

    Where it fits

    In the default workflow it sits at the front, feeding the Music Generator. The nice property is that it's a pure function of text, so you can drop it into any graph and even use it as a general music-tag normalizer independent of HeartMuLa. If you're generating multiple tracks and want consistent output, keep the same tags across runs and change the seed - the Tag Builder doesn't randomize anything, which is exactly what you want from a prompt builder.

    CategoryJK-HeartMuLa

    Inputs (8)

    NameTypeDefaultDescription
    genreSTRINGGenre — type any comma-separated tags. Suggestions: pop, rock, hip hop, electronic, jazz, classical, r&b, soul, funk, disco, house, techno, trance, drum and bass, ambient, lo-fi, synthwave, metal, punk, indie, folk, country, blues, gospel, reggae, latin, afrobeat, k-pop, orchestral, cinematic
    moodSTRINGMood — type any comma-separated tags. Suggestions: uplifting, melancholic, energetic, mellow, dreamy, dark, euphoric, nostalgic, tense, triumphant, romantic, somber, playful, hypnotic, anthemic, serene, gritty, bittersweet
    instrumentSTRINGInstruments — type any comma-separated tags. Suggestions: acoustic guitar, electric guitar, piano, synthesizer, bass guitar, drum kit, 808 bass, strings, brass, saxophone, violin, cello, flute, organ, electric piano, pads, arpeggiated synth, hand percussion, choir, harp
    tempoCOMBOnoneOverall tempo feel (single pick).
    vocalSTRINGVocals — type any comma-separated tags. Suggestions: male vocals, female vocals, duet, group vocals, choir, rap, spoken word, falsetto, belting, breathy, layered harmonies, vocoder, instrumental
    eraCOMBOnoneProduction era (single pick).
    productionSTRINGProduction — type any comma-separated tags. Suggestions: polished, raw, lo-fi, hi-fi, warm, punchy, spacious, compressed, vintage tape, reverb-heavy, dry, wide stereo, minimal, dense
    additional_tagsoptSTRINGFree-form comma-separated tags for anything the fields above don't cover.

    Outputs (1)

    NameTypeDescription
    tagsSTRING