VRGDG_LLM_PromptBatcher
Automatically write a scene prompt per beat of your story, in batches
- story_groups_json
- trigger
- lyric_segments_json
- prompt
- batch_index
- total_batches
- is_final_batch
- output_folder
- file_prefix
VRGDG_LLM_PromptBatcher is the part of the music-video pipeline that turns "here's my story" into "here are forty individual scene prompts," written in batches so an LLM can grind through them without a meltdown. If you've ever loaded one of VRGameDevGirl's "unlimited length" LTX-2.3 music-video workflows, this is the node doing the writing while you're doing anything else.
Here's the problem it solves. LTX rewards long, detailed prompts - the community consensus is that "the secret sauce for LTX seems to be long prompts," and a music video has dozens of scenes. Hand-writing forty cinematic paragraphs is miserable. This node takes your story summary, a JSON list of scene groups, your style/theme block, and optional lyrics, and generates a full scene prompt for each group - in batches, so you can review and queue them in manageable chunks.
The inputs that matter
- story_summary - the throughline of your video. One or two paragraphs.
- story_groups_json - a JSON structure describing the scene groups (the beats the workflow should write prompts for). This is the structural skeleton of your video.
- style_theme_block - how it should look and feel: mood, palette, genre.
- lyric_segments_json (optional) - timed lyric segments, so prompts can be written against what's actually being sung in each scene. This is what ties the video to the song.
- batch_size - 5 to 20, default 10. Prompts per batch. Lower on a slow LLM, raise if you're impatient.
- output_subfolder / file_prefix - where the written prompt files land (
llm_batchesby default, files prefixedScene). TheVRGDG_ArchiveLlmBatchFoldersnode exists to clean these up later. - manual_index - -1 (default) means "auto, run through all batches." Set a specific batch number to re-run just one scene.
- enable_auto_queue - true by default. It means the node keeps queuing batches on its own. Useful; just know it's doing that so a 40-scene video doesn't need you at the keyboard the whole time.
- trigger - a wildcard input so you can fire it from the rest of the graph.
The outputs tell you where you are in the run: prompt (this batch's prompt text), batch_index and total_batches (progress), is_final_batch (a boolean you can wire to stop the loop), and output_folder / file_prefix so downstream nodes know where the prompts were written. Wire prompt into your LLM node's input or feed the written files into the scene-generation stage.
Setup and what to expect
Shared pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
or Manager → search "vrgamedev", restart. It needs a working local LLM alongside it - this node orchestrates the batching; the actual text generation comes from a node like VRGDG_LocalLLM or VRGDG_SuperGemmaGGUFChat wired into the same graph.
The honest caveats: this is a big, opinionated node that only makes sense inside the pack's music-video workflows, and it assumes your story JSON is shaped the way the workflow expects - copy the structure from the author's example rather than guessing. And with enable_auto_queue on, it will happily chew through all your batches unattended, which is great until you realize it's been generating scenes for an hour on a story you already changed. It's the most powerful node in the pack, and it rewards reading the workflow around it first.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| style_theme_block | STRING | — | |
| story_summary | STRING | — | |
| story_groups_json | JSON | — | |
| batch_size | INT | 105–20 | — |
| output_subfolder | STRING | llm_batches | — |
| file_prefix | STRING | Scene | — |
| manual_index | INT | -1 | — |
| enable_auto_queue | BOOLEAN | true | — |
| trigger | * | — | |
| lyric_segments_jsonopt | JSON | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| batch_index | INT | — |
| total_batches | INT | — |
| is_final_batch | BOOLEAN | — |
| output_folder | STRING | — |
| file_prefix | STRING | — |