Nodes/SongBloom_ComfyUI/SongBloom Lyric Processor
ComfyUI Node

SongBloom Lyric Processor

The lyric cleanup node that stops the model from singing nonsense

By xuchenxu168·Created 12 months ago·Updated 10 months ago· 15
SongBloom Lyric Processor
    • processed_lyrics
    • validation_info
    lyrics[intro] [intro] [intro] [intro] [intro] [intro] [intro] [intro] [intro] [intro] , [verse] City lights flicker through the car window. Dreams pass fast where the lost ones go. Neon signs echo stories untold. I chase shadows while the night grows cold , [chorus] Run with me down the empty street. Where silence and heartbeat always meet. Every breath. a whispered vow. We are forever. here and now
    validate_formattrue

    SongBloom is picky about lyrics in a way image models aren't picky about prompts. There's a strict-ish format - structure tags like [verse] and [chorus], commas between sections, periods between sentences - and when you ignore it, you don't get a graceful failure, you get a song that mangles words or drifts into gibberish. This node is the enforcement layer: it takes whatever lyrics you typed and normalizes them into the shape the model expects.

    It's the node you drop between your lyric source (handwritten, SongBloomLyricGenerator, or DeepSeek output) and the SongBloomGenerator. You can write valid lyrics by hand and skip it, but "can" and "should" part ways when your lyrics have stray whitespace, inconsistent tag spacing, or missing section structure.

    What it does

    The mechanics are modest and honest. It strips the input, collapses whitespace, and normalizes the spacing around every [tag] so the tokenizer sees clean, predictable structure. That's the "processing" half. The validation half checks that the format is actually load-bearing: it verifies structure tags are present, sections are separated by commas, and vocal sections have sentence separators. The result is a cleaned string plus a report.

    Inputs and outputs

    • lyrics (required) - multi-line text with SongBloom structure tags. The default is a complete example song, which is a useful template for the format.
    • validate_format (required) - on by default. Turn it off if you want the cleanup without the complaint letter.

    Outputs:

    • processed_lyrics (STRING) - the cleaned lyrics, wired into the generator's lyrics input.
    • validation_info (STRING) - a human-readable status of what was fixed or what's still wrong.

    The format it enforces

    Quick cheat sheet, because this is the actual spec:

    [intro] [intro] [intro] , [verse] Sentence one. Sentence two. , [chorus] Hook line one. Hook line two. , [inst] [inst] [inst] , [outro] [outro]
    
    • Sections separated by ,
    • Sentences within vocal sections separated by .
    • Repeat [inst] / [intro] tags to stretch instrumental sections
    • At least one vocal section ([verse], [chorus], or [bridge])

    If validation is on and your input breaks these rules, the report tells you exactly which one. It won't fix your lyrics for you - but combined with SongBloomLyricValidator's suggestions, you can usually get a broken block into shape in one pass.

    Install

    Pack install, nothing special:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xuchenxu168/SongBloom_ComfyUI
    cd SongBloom_ComfyUI
    pip install -r requirements.txt
    

    ComfyUI Manager users can search "SongBloom_ComfyUI". Restart and look under SongBloom/Text.

    One honest heads-up that no preprocessing fixes: even with perfectly formatted lyrics, English output from SongBloom is unreliable - the model is heavily trained on Chinese pop, and English lines frequently come out garbled while Chinese sings clean. If your lyrics keep rendering wrong, try the pinyin lyric processor on the model loader or just accept the model's accent. That's a model limitation, not a formatting failure.

    CategorySongBloom/Text

    Inputs (2)

    NameTypeDefaultDescription
    lyricsSTRING[intro] [intro] [intro] [intro] [intro] [intro] [intro] [intro] [intro] [intro] , [verse] City lights flicker through the car window. Dreams pass fast where the lost ones go. Neon signs echo stories untold. I chase shadows while the night grows cold , [chorus] Run with me down the empty street. Where silence and heartbeat always meet. Every breath. a whispered vow. We are forever. here and now
    validate_formatBOOLEANtrue

    Outputs (2)

    NameTypeDescription
    processed_lyricsSTRING
    validation_infoSTRING