ComfyUI Node

Parse Song Draft

Your Local LLM Won't Follow Your Format — Parse Song Draft Makes It

By jplenio·Created a day ago·Updated about 13 hours ago· 2
Parse Song Draft
  • request
  • title
  • style
  • lyrics
  • artwork_prompt
  • report
◄text—►

What it is

Parse Song Draft is the bouncer between your writer model and your song. Compose Writing Prompt (or whatever feeds your LLM) asks for a titled, tagged, sectioned draft; the model, being a chat model, answers with markdown scaffolding, a bolded **TITLE:** line, maybe an assistant delimiter, maybe a nice paragraph explaining what it just wrote. None of that should reach YuE2's lyrics conditioning. This node takes that messy answer apart, keeps the four documents you actually need, and fixes the format on the way out.

It's the second half of Plenio's writing stage, and it exists because of a real failure mode the whole local-LLM-prompting scene shares: a model that isn't decoding-constrained hands you its conversational habits as literal prompt text. In an image workflow that leaks Here is your enhanced prompt: into your conditioning. In a music workflow it leaks into your lyrics.

How it works

Two inputs, both required. text is the writing model's raw answer - wire it straight from the native Generate Text node's string output, no cleanup in between. request comes from Compose Writing Prompt and is the contract: it knows what was asked for (which engine, whether the song is instrumental, which sections the score defined, what the brief said), so Parse Song Draft can check the answer against the question rather than guessing.

Inside, it labels out TITLE, STYLE, LYRICS and ARTWORK blocks whether they arrive as "TITLE: text", ### STYLE or **Lyrics:** - and it deliberately refuses to treat a lyric line like "Style is everything" as a heading, because a bare label only counts when it stands alone. Reasoning scratch-work gets stripped (<think>…</think>, channel-delimited analysis and similar), code fences are dropped, and the format is then enforced deterministically: style stays one line, lyrics get [Tag] sections, and instrumentals are reduced to the single [instrumental] tag - the author's own tests found that produces fewer vocal-like sounds than leaving section tags in.

Nothing is fixed silently. Every change lands in the report output, along with severity-tagged findings (an error if a document breaks the model's rules, a warning if something had to be enforced), so a run that "worked" but mangled your chorus is visible rather than mysterious.

Inputs and outputs

The outputs are the four documents - title, style, lyrics, artwork_prompt - plus report. Wire title, style and lyrics into Song Sheet (via the sheet's draft inputs); artwork_prompt goes to the Cover Art block's prompt encoder, and report into a report slot on Export Release so the release record shows what the writer actually said.

request is not optional and not decorative. Feed this node a request built from a different brief and the findings fill up with mismatches - that's the node telling you the graph has drifted, not a bug.

Install

ComfyUI 0.37.0 or newer is required either way - the native text-generation node this pairs with doesn't exist before that.

# ComfyUI Manager: Manager → Custom Nodes Manager → search "Plenio Music Production System"
# or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/jplenio/Plenio-Music-Production-System
# restart ComfyUI

No Python packages get installed by the pack - requirements.txt declares nothing on purpose, and the code leans on what ComfyUI already ships. Open the 0 · System Check template once after restarting to see versions and which model files you're still missing.

Common issues

  • Empty outputs. The model got cut off before it finished the draft. Check the writer's token limit; a truncated answer has no LYRICS block to find.
  • The report is noisy but the run is fine. enforcements is a list of cosmetics the node applied - a stripped preamble, a folded style line. That's the node working, not failing.
  • Instrumental lyrics still mention a voice. The sheet is stricter than this node: instrumental lyrics must be tags only, and vocal words in them get flagged. Fix the brief or the draft, not the lyrics.
  • Wrong draft, right format. If the title and lyrics look like a different song, your request input is coming from another branch of the graph. It is the checksum for the whole writing stage; keep it paired with its own Compose Writing Prompt.
CategoryPlenio/Writing

Inputs (2)

NameTypeDefaultDescription
textSTRINGThe writing model's answer.
requestPLENIO_REQUESTFrom Compose Writing Prompt.

Outputs (5)

NameTypeDescription
titleSTRINGSong title draft.
styleSTRINGStyle draft.
lyricsSTRINGLyrics draft.
artwork_promptSTRINGCover image prompt draft.
reportPLENIO_REPORTWhat was parsed and enforced.