H3 Compact Director — Select Scene Prompt
Why your three-scene director output is one JSON string
- prompt
What it is
The compact director's sequence modes (Enhance, Continuous Edit, Continuous Elaborate) don't return three separate prompts. They return one string that contains JSON:
{"scene_prompts": ["[reference generation]\n\nScene one...", "Scene two...", "Scene three..."]}
That is useless to a text encoder, which will happily condition on the raw braces and quotes. H3CompactPromptSelect is the two-input node that pulls one scene out of that blob and hands you a clean STRING. It's the least glamorous node in the pack and the one you'll end up leaving in every graph.
How it works
The logic is short enough to describe exactly. The node tries json.loads on whatever arrives at its input. If parsing fails, or the parsed value isn't an object with a scene_prompts list, it returns your input unchanged. If it parses and the list has something at your index, it returns that entry, whitespace-stripped. If the index is out of range, or the selected entry is missing or empty, it raises instead of quietly giving you a blank prompt: "The director response has no prompt at the requested scene index."
That pass-through behaviour is quietly the best thing about it. You can park this node after the director permanently and switch between compact (single prompt) and Enhance (many prompts) without rewiring anything - in single-prompt modes it's a no-op that hands your prompt straight through. Leaving it in the graph costs you nothing.
Inputs and outputs
prompt(multiline STRING) - the director'sedit_promptoutput. That's the one to connect; in sequence modes it holds the JSON.scene_index(INT, 0–11, default 0) - which scene you want, zero-based. Scene 1 is index 0. This is the single thing people get wrong.
Output is prompt (STRING), next stop your H3 conditioning or prompt node.
Wiring it up
Director edit_prompt → prompt, then one select node per scene you want to render, each with a different scene_index. Set the director's continuous_scene_count to 3 and you get scenes 0, 1 and 2; ask for index 5 and you get an exception, not an empty prompt. The director's continuous_scene_count INT output is handy here - you can preview it, or use it to sanity-check that you haven't parked a select node past the end of the sequence. The director's validation output also reports the prompt count it actually returned, which is the fastest way to debug an index error.
A common pattern is one director feeding several selects, each going to its own video-sampling branch, so a three-scene story generates as a batch instead of a manual copy-paste loop. If you only ever run compact or Elaborate, a single prompt-select node after the director is still worth keeping - it's a pass-through that documents intent.
Install
Same as the rest of the pack - ComfyUI Manager, search Vision Prompt Assistant, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/elgalardi/ComfyUI-VisionPromptAssistant
No dependencies, no models, and it needs ComfyUI 0.30+ because the whole pack uses the newer node API. This node has no provider attached to it, so it doesn't matter whether you're running the OpenRouter, Ollama, API or local Qwen provider upstream.
Common issues
"The director response has no prompt at the requested scene index." Your index is past the end of the list. Drop it and check continuous_scene_count. Alternatively, the upstream mode isn't a sequence mode, so there is no scene_prompts list at all - but in that case you'd have gotten a pass-through, not this error, so the index is the culprit.
The prompt works but the video ignores parts of it. You're probably looking at scene boundaries, not this node. Each scene in the JSON is a self-contained direction with its own bracketed mode header, and the director is told not to replay completed actions across scenes. If scene 2 seems to re-run scene 1, edit the request and re-run rather than hand-patching the JSON - see the director's node page for the mode differences.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| scene_index | INT | 00–11 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |