Generate H3 Prompts
The stage that finally writes real MiniMax H3 scene prompts
- consolidated_references
- lmstudio_config
- prompts
Everything before this node was bookkeeping: catalog the cast, pick which reference views you'll render. Generate H3 Prompts is where the actual MiniMax H3 prompt text gets written, and it's the payoff for the whole yuyuki/minimax_h3_novel_pipeline. It takes the consolidated reference registry (consolidated_references, type MINIMAX_REGISTRY) plus the chapter text and asks the LLM, scene by scene, which of your hundreds of reference images are actually useful for that shot - close dialogue wants the face and a three-quarter; someone walking away wants the back view plus an identity shot; an establishing shot wants the location's wide.
Then a deterministic allocator, not the LLM, applies your budget. That separation is the clever bit: the model suggests, the code enforces. max_pictures (8), max_pictures_per_subject (4) and max_audio (4) are workflow budgets, deliberately documented as not claims about MiniMax's service-side limits - a reminder that H3 itself caps how many references you can attach per request. duration (8 seconds) and scenes_per_chunk (4) shape how much scene the model writes in one call, and repair_attempts (2) lets it fix its own output: shot numbering, timestamps, dialogue <d>[Language]...</d> syntax, subject/picture label consistency, and the 350–500 word detailed_description target all get validated and, if needed, repaired.
What comes out
For each chapter it writes, under your out_dir (ComfyUI's output folder, minimax_h3_novel/h3_prompts/<chapter_id>/), three files per scene: a *_prompt.txt with the finished H3 prompt, a *_assets.json with the full binding structure, and a *_source.txt recording provenance. The asset JSON is the heart of it: one H3 <Subject N> per entity, each subject carrying one or more <Picture N> references, plus picture_input_order and audio_input_order - the exact attachment order. That order is load-bearing; H3 cares which image is Picture 1.
The node's single output is prompts (type MINIMAX_PROMPTS), a manifest that bundles every scene across chapters with the prompt text and bindings inline so the next node doesn't have to re-read the disk.
Wiring and reality checks
Inputs mirror the rest of the pack: consolidated_references, lmstudio_config, and chapter text via chapter_paths or the saved_chapter picker. max_scenes (0 = no cap) and force round out the useful controls. Two honest warnings. First, like its siblings this node is slow - it's a long chain of local-LLM calls, so keep LM Studio's concurrency at 1 and budget accordingly. Second, and this is where people get confused: the output is text and a plan, not video. The prompt and the asset bindings describe images that the pack expects you to have already rendered from the consolidation stage's briefs. The text file tells H3 who's in the scene and how to cite them; you still attach the actual PNGs when you run MiniMax H3 Reference to Video. That's what Select H3 Scene exists to hand you next.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| consolidated_references | MINIMAX_REGISTRY | — | |
| lmstudio_config | MINIMAX_LMSTUDIO_CONFIG | — | |
| chapter_paths | STRING | — | |
| saved_chapter | COMBO | 1 options: | |
| duration | FLOAT | 8.000.1–3600 | — |
| chunk_chars | INT | 140003000–1000000 | — |
| overlap_paragraphs | INT | 20–100 | — |
| scenes_per_chunk | INT | 41–100 | — |
| max_scenes | INT | 00–10000 | — |
| max_pictures | INT | 81–100 | — |
| max_pictures_per_subject | INT | 41–10 | — |
| max_audio | INT | 40–100 | — |
| temperature | FLOAT | 0.380–2 | — |
| max_tokens | INT | 8000256–100000 | — |
| repair_attempts | INT | 20–10 | — |
| force | BOOLEAN | false | — |
| out_dir | STRING | /tmp/ComfyUI/output/minimax_h3_novel/h3_prompts | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompts | MINIMAX_PROMPTS | — |