Nodes/MiniMax H3 Novel Pipeline/Generate H3 Prompts
ComfyUI Node

Generate H3 Prompts

The stage that finally writes real MiniMax H3 scene prompts

By yuyuki·Created 6 days ago·Updated 2 days ago· 0
Generate H3 Prompts
  • consolidated_references
  • lmstudio_config
  • prompts
chapter_paths
saved_chapter
duration8.00
chunk_chars14000
overlap_paragraphs2
scenes_per_chunk4
max_scenes0
max_pictures8
max_pictures_per_subject4
max_audio4
temperature0.38
max_tokens8000
repair_attempts2
forcefalse
out_dir/tmp/ComfyUI/output/minimax_h3_novel/h3_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.

CategoryMiniMax H3 Novel

Inputs (17)

NameTypeDefaultDescription
consolidated_referencesMINIMAX_REGISTRY
lmstudio_configMINIMAX_LMSTUDIO_CONFIG
chapter_pathsSTRING
saved_chapterCOMBO1 options:
durationFLOAT8.000.1–3600
chunk_charsINT140003000–1000000
overlap_paragraphsINT20–100
scenes_per_chunkINT41–100
max_scenesINT00–10000
max_picturesINT81–100
max_pictures_per_subjectINT41–10
max_audioINT40–100
temperatureFLOAT0.380–2
max_tokensINT8000256–100000
repair_attemptsINT20–10
forceBOOLEANfalse
out_dirSTRING/tmp/ComfyUI/output/minimax_h3_novel/h3_prompts

Outputs (1)

NameTypeDescription
promptsMINIMAX_PROMPTS