VRGDG Lyric Segment Text Cleaner
Turning 'Na Na Na Na' Into Something a Video Model Can Use
- cleaned_lyrics_text
- changed_count
- notes
VRGDG_LyricSegmentTextCleaner takes raw transcribed lyric segments and makes them presentable: it shortens repeated filler lyrics, smooths one-word fragments into real phrases, and reports what it changed. It's the "read your own lyrics before you show them to a video model" step that most people skip and then regret.
Here's the problem it solves. Song lyrics are full of repetition - choruses repeat the same "la la la" or "yeah yeah yeah" line for bars on end - and transcription of sung vocals adds its own noise: fragments, stutters, half-words. If you feed that verbatim into a prompt creator, you're spending your prompt budget on the same filler forty times, and the video model dutifully generates forty nearly identical filler scenes. This node collapses the noise down to something a scene-prompt pipeline can actually work with.
Inputs worth touching
lyrics_text- the raw extracted lyric segments.repeat_output_count(default 3) - how many times the collapsed filler line still appears. It doesn't delete the chorus entirely; it trims it to a sane count so the song's structure survives.min_repeats_to_collapse(default 4) - how many repeats a line needs before the node considers it filler and starts shortening it.bridge_single_word_segments(default on) - when a segment is a single non-filler word ("Running…"), blend it with the neighboring lyric words so it reads as a phrase instead of a lone orphan.
Outputs are cleaned_lyrics_text (the result), changed_count (how many segments got edited - a quick health check on whether the source was noisy), and notes (what the node actually did).
Why it matters
In this pack's music-video flow, cleaned lyrics flow into VRGDG_MusicVideoPromptCreatorV3 via the pipe-separated lyrics field. Clean input means the LLM spends its attention on real lines instead of pattern-matching "oh, another chorus." Outside the pack, it's useful for anything lyric-driven - lyric videos, karaoke prompts, synced scene generation - and honestly it's a relief to have automated, because nobody wants to hand-trim "na na na" from a 4-minute song.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
Restart ComfyUI; it lives under VRGDG/General. ComfyUI Manager: search vrgamedev. No extra downloads.
The honest part
Filler-detection is rule-based, so its judgment on what's "filler" may not match yours. min_repeats_to_collapse is the dial you'll actually want to move - pop songs repeat a lot, and if you're finding the cleaner too aggressive on a song with a genuinely important repeated hook, raise the threshold. And check changed_count occasionally; if it's zero on a noisy track, the node didn't recognize the pattern and you should look at the source transcription instead.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| lyrics_text | STRING | — | |
| repeat_output_count | INT | 32–8 | — |
| min_repeats_to_collapse | INT | 42–50 | — |
| bridge_single_word_segments | BOOLEAN | true | When a segment has one non-filler word, blend it with neighboring lyric words. |
| fill_empty_segments | BOOLEAN | true | Replace blank lyricSegmentN lines with a short instrumental placeholder so downstream prompt nodes do not receive empty lyrics. |
| empty_segment_text | STRING | Instrumental section. | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| cleaned_lyrics_text | STRING | — |
| changed_count | INT | — |
| notes | STRING | — |