ComfyUI Node

VRGDG_LLM_PromptBatcher

Automatically write a scene prompt per beat of your story, in batches

By vrgamegirl19·Created about a year ago·Updated about 7 hours ago· 718
VRGDG_LLM_PromptBatcher
  • story_groups_json
  • trigger
  • lyric_segments_json
  • prompt
  • batch_index
  • total_batches
  • is_final_batch
  • output_folder
  • file_prefix
style_theme_block
story_summary
batch_size10
output_subfolderllm_batches
file_prefixScene
manual_index-1
enable_auto_queuetrue

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_batches by default, files prefixed Scene). The VRGDG_ArchiveLlmBatchFolders node 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.

CategoryVRGDG/LLM

Inputs (10)

NameTypeDefaultDescription
style_theme_blockSTRING
story_summarySTRING
story_groups_jsonJSON
batch_sizeINT105–20
output_subfolderSTRINGllm_batches
file_prefixSTRINGScene
manual_indexINT-1
enable_auto_queueBOOLEANtrue
trigger*
lyric_segments_jsonoptJSON

Outputs (6)

NameTypeDescription
promptSTRING
batch_indexINT
total_batchesINT
is_final_batchBOOLEAN
output_folderSTRING
file_prefixSTRING