VRGDG_IndexedPromptChunker
One Giant Prompt, Fifty Scene-Sized Prompts, Zero Copy-Paste
- text_output_1
- text_output_2
- text_output_3
- text_output_4
- text_output_5
- text_output_6
- text_output_7
- text_output_8
- text_output_9
- text_output_10
- text_output_11
- text_output_12
- text_output_13
- text_output_14
- text_output_15
- text_output_16
- text_output_17
- text_output_18
- text_output_19
- text_output_20
- text_output_21
- text_output_22
- text_output_23
- text_output_24
- text_output_25
- text_output_26
- text_output_27
- text_output_28
- text_output_29
- text_output_30
- text_output_31
- text_output_32
- text_output_33
- text_output_34
- text_output_35
- text_output_36
- text_output_37
- text_output_38
- text_output_39
- text_output_40
- text_output_41
- text_output_42
- text_output_43
- text_output_44
- text_output_45
- text_output_46
- text_output_47
- text_output_48
- text_output_49
- text_output_50
VRGDG_IndexedPromptChunker takes one big multiline prompt and carves it into scene_count smaller chunks, exposing each chunk on its own output socket. It's the node that turns a single LLM-generated "here's the whole music video" prompt into the per-scene prompts your sampler actually consumes.
Here's the shape of the problem. A video model like LTX works best on short, focused prompts, and the modern way to write them is to have an LLM draft the entire video as one structured text - every scene, every camera move, every lighting change. But a sampler can't eat 2,000 words at once, and you don't want to hand-copy each scene into its own node. This node is the seam: paste the whole thing into prompt_text, tell it how many scenes exist, and the scene prompts come out the other side ready to wire into per-chunk conditioning.
Inputs that matter
prompt_text- the full multi-scene prompt, one scene per logical block.scene_count- how many chunks to split into (1–50, default 16).index- which "set" of scenes this run processes.total_sets- how many sets the whole video is divided into.
Those last two are the interesting part, and they're what make this node scalable. If your video is 48 scenes but you want to generate in three runs of 16, you set total_sets = 3 and feed index = 0, then 1, then 2 across runs - each run's chunker hands you the matching 16 scene prompts instead of always starting from scene one. It's a poor-man's batching system for long videos.
The output layout
You get 50 text_output_1 through text_output_50 sockets, and the node fills as many as scene_count needs. In practice you wire text_output_1 into the first scene's CLIP encoder or conditioning block, text_output_2 into the second, and so on. The sockets exist whether or not they're populated, so unused ones just sit empty - wire only what you need.
Why it matters here
This is the connective tissue of the VRGameDevGirl music-video workflow: VRGDG_MusicVideoPromptCreatorV3 generates the full run, this chunker splits it into scene prompts, and each chunk feeds an LTX generation. Without it you'd be rebuilding the per-scene plumbing every time the LLM decided the video should have a different number of scenes.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
Restart ComfyUI; it's under VRGDG. ComfyUI Manager users search vrgamedev. No extra models or downloads - the pack's requirements.txt (kornia, librosa, imageio) covers the heavier nodes, and this one is pure string splitting.
Honest note
The chunking is deterministic and dumb - it splits by scene block and trusts your formatting. If your LLM doesn't separate scenes cleanly (blank lines, numbered markers, whatever you prompt it to use), the chunks come out misaligned and the whole downstream graph inherits the mess. Keep the prompt format consistent and this node is invisible; break the format and it's the first place to check.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_text | STRING | — | |
| scene_count | INT | 161–50 | — |
| index | INT | 00–999 | — |
| total_sets | INT | 11–999 | — |
Outputs (50)
| Name | Type | Description |
|---|---|---|
| text_output_1 | STRING | — |
| text_output_2 | STRING | — |
| text_output_3 | STRING | — |
| text_output_4 | STRING | — |
| text_output_5 | STRING | — |
| text_output_6 | STRING | — |
| text_output_7 | STRING | — |
| text_output_8 | STRING | — |
| text_output_9 | STRING | — |
| text_output_10 | STRING | — |
| text_output_11 | STRING | — |
| text_output_12 | STRING | — |
| text_output_13 | STRING | — |
| text_output_14 | STRING | — |
| text_output_15 | STRING | — |
| text_output_16 | STRING | — |
| text_output_17 | STRING | — |
| text_output_18 | STRING | — |
| text_output_19 | STRING | — |
| text_output_20 | STRING | — |
| text_output_21 | STRING | — |
| text_output_22 | STRING | — |
| text_output_23 | STRING | — |
| text_output_24 | STRING | — |
| text_output_25 | STRING | — |
| text_output_26 | STRING | — |
| text_output_27 | STRING | — |
| text_output_28 | STRING | — |
| text_output_29 | STRING | — |
| text_output_30 | STRING | — |
| text_output_31 | STRING | — |
| text_output_32 | STRING | — |
| text_output_33 | STRING | — |
| text_output_34 | STRING | — |
| text_output_35 | STRING | — |
| text_output_36 | STRING | — |
| text_output_37 | STRING | — |
| text_output_38 | STRING | — |
| text_output_39 | STRING | — |
| text_output_40 | STRING | — |
| text_output_41 | STRING | — |
| text_output_42 | STRING | — |
| text_output_43 | STRING | — |
| text_output_44 | STRING | — |
| text_output_45 | STRING | — |
| text_output_46 | STRING | — |
| text_output_47 | STRING | — |
| text_output_48 | STRING | — |
| text_output_49 | STRING | — |
| text_output_50 | STRING | — |