Nodes/comfyui-fvmtools/Music · Cover-Prompt bauen
ComfyUI Node

Music · Cover-Prompt bauen

Stop asking an LLM to guess how long a line should be

By ping1979ping·Created 7 months ago·Updated 2 days ago· 2
Music · Cover-Prompt bauen
    • user_prompt
    • system_prompt
    • info
    ◄user_prompt—►
    ◄system_prompt—►
    ◄prosody_brief—►
    ◄flavor_artthema►
    ◄flavor_text►
    ◄strengenah►
    ◄referenz_mitgebenfalse►
    ◄language—►
    ◄reference_lyrics—►

    If you have ever asked a chat model for "new lyrics for this song, same feel", you know what you get back: something plausible, the right number of verses, and completely unsingable. Lines run long, stresses land on the wrong beat, and the chorus has four lines where the original had three. The model is not being lazy. It is estimating syllables, and it is bad at it.

    This node is the fix. It does not write anything and it calls no API - it is a string assembler that takes the measured form of your reference recording and bolts it onto the prompts you were already going to send to your LLM. Fifty lines of Python, no model, no key, no dependency.

    Where it sits in the graph

    Think of the cover workflow in three parts. Something measures the original text (FVM_LyricsProsodyAnalyze), something writes the new one (your local LM Studio / LLM chat node), and something renders (YuE2 via ABC score conditioning). This node is the handshake between the first two.

    It expects the prompt pair that the FVM Music Production Toolkit branch already builds - the code comments name MiniMaxStructuredPromptV20 for the builder and MiniMaxParseExternalLLMOutputV16 for the parser, and that four-section output contract ([Style], [Lyrics], [Title], [Image_Prompt]) must survive untouched. This node deliberately does not change it: it only adds to the prompts, so the parser downstream still works.

    What it actually appends

    The user prompt gets a block headed COVER FORM TARGET (measured from the reference recording), followed by whatever prosody_brief carries - section order, lines per section, syllables per line, rhyme scheme - and then a set of form rules: keep the section order and line counts, match each line's syllable count within ±0/1/2 syllables depending on strenge, reproduce the rhyme scheme, write original text, keep the language, and don't pad short lines with "oh, yeah, na". The system prompt gets a short COVER MODE paragraph so those instructions carry weight against whatever generic lyric advice is already in there.

    Three flavours, because "write me new lyrics" means different things:

    • thema - you give a theme ("leaving at the station"), the model invents the images.
    • begriffe - you give terms you want worked in, and the rule explicitly says not as a list and not all in one line.
    • umdichten - you hand it an existing text to bend onto the measured form, keeping its meaning.

    Wire flavor_text accordingly. strenge is the tolerance dial: streng means zero syllables of slack, frei gives the model two per line. nah is the default and the sane starting point.

    The one trap worth knowing

    referenz_mitgeben puts the original lyrics into the prompt. The author's own tooltip says exactly what happens: you get more accurate stress placement, and the model starts copying. The rules tell it not to reuse lines or wording, and the code says the boundary between a cover and a theft - form is the target, words are yours - is a thing an LLM only respects if you say it. It is off by default for that reason. Turn it on when you want tighter phrasing and you plan to rewrite the output yourself.

    Also: the language input, if left empty, becomes "same as the reference" in the prompt. Fine for a single-language session, sloppy if the reference is bilingual.

    Install

    ComfyUI Manager, search the pack title comfyui-fvmtools, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ping1979ping/comfyui-FVMtools
    

    Restart ComfyUI. No extra Python dependencies - numpy is all the music nodes touch, and it's already there. (Note the README's clone snippet still says your-username; use the real URL above.) You'll find the node under Add Node → FVMtools/music, which is a different casing from the older FVM Tools/... categories - one menu, two conventions.

    Common issues

    Nothing happens when you queue. Correct - this node never calls an LLM. Its two prompt outputs have to go into an actual chat node (LM Studio, Ollama, whatever you run locally), and the reply goes to the parser.

    The LLM still overruns the syllable budget. Two causes: strenge is set to frei, or the prosody_brief it was fed is junk. A brief measured from unbroken prose is worse than no brief; check it before blaming the prompt. That's the job of FVM_LyricsProsodyAnalyze.

    The downstream parse fails. You (or something downstream) renamed or reordered the four sections. The output contract is load-bearing here.

    It rhymes, but it sounds nothing like the original. That's by design - form gets copied, not content. If you want the phrasing closer, enable referenz_mitgeben and expect to edit.

    CategoryFVMtools/music

    Inputs (9)

    NameTypeDefaultDescription
    user_promptSTRING—
    system_promptSTRING—
    prosody_briefSTRING—
    flavor_artCOMBOthema3 options: thema, begriffe, umdichten
    flavor_textSTRINGThema, Begriffe oder der umzudichtende Text.
    strengeCOMBOnahSilben-Toleranz pro Zeile: streng 0, nah 1, frei 2.
    referenz_mitgebenBOOLEANfalseOriginaltext in den Prompt legen. Genauere Betonungen, aber das Modell neigt dann zum Abschreiben.
    languageoptSTRING—
    reference_lyricsoptSTRING—

    Outputs (3)

    NameTypeDescription
    user_promptSTRING—
    system_promptSTRING—
    infoSTRING—