APNext H3 Reference Prompt Writer
Give MiniMax-H3 reference images a spec-compliant prompt (six sections)
- image_1
- image_2
- image_3
- image_4
- h3_prompt
- subject_definitions
- summary
- retention_analysis
- detailed_description
- overall_soundscape
- non_diegetic_music
- model_used
Once you leave pure text-to-video, MiniMax-H3's "full-reference" format is where the model actually earns its keep - and where hand-writing prompts goes from hard to hopeless. This is the mode for character and object consistency: you attach reference images of your subject, and the prompt tracks that content across shots with formal labels - <Subject N>, <Picture N> - plus a retention_analysis section that says whether each referenced thing is preserved, transferred, or reused. It's the difference between a video that features "a woman" and one that keeps your woman's cardigan, scar and gait for six shots.
The APNext H3 Reference Prompt Writer does what its sibling does for the base format, but for the six-section full-reference rewrite: subject_definitions, summary, retention_analysis, detailed_description, overall_soundscape, non_diegetic_music. The official full-reference guide (VIDEO_PROMPT_WRITING_GUIDE_ref_en.md) ships verbatim in data/h3/ and acts as the system prompt, so the output follows the real spec - label rules, retention markers, the lot.
How it works
idea is what should happen in the target video; up to four reference images (image_1–image_4) become the content the model tracks. reference_role decides how those images get labelled: as reusable subjects, as concrete frame anchors (<Picture N>), style-only, or storyboard references - or Auto and it decides per image. task_type here is the square-bracketed summary prefix: keyframe completion, reference generation, video editing, video continuation, audio reuse, audio reference - and Auto lets the model combine them with + when the job is really a mix. The summary then carries those labels, and retention_analysis records where each one actually appears in the timeline.
A few knobs worth knowing:
word_target- target length fordetailed_description. The guide recommends 350–500 for generation tasks; 425 is a sensible default.reference_notes- one line per reference ("Image 1: the woman, keep her cardigan"), and it's also how you describe video or audio references you can't attach as images.wildness,camera_*,dialogue_language,include_dialogue- identical semantics to the base writer.
Everything else - model (auto-detect, cloud or local), temperature, seed, model_override, local_base_url - matches the base writer exactly, and outputs give you the full h3_prompt plus every section split out (subject_definitions, summary, retention_analysis, detailed_description, overall_soundscape, non_diegetic_music) and model_used.
Install
Same pack, same route as every other node here - ComfyUI Manager (search "comfyui_dagthomas") or:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
Restart, set whichever provider API key you plan to use as an environment variable, and it's live. No model downloads for this node - the guide files are already in the pack.
Common issues
- References getting dropped - if the model isn't respecting an image, check
reference_roleis labelling it the way you intend, and usereference_notesto be explicit about what must survive. - Runaway length - lower
word_target. The guide's own range is 350–500 words; above that you're paying for verbosity, not fidelity. - The usual local-server gotcha - local
ollama:/lmstudio:/local:entries only list what was running when the page loaded, and they need a vision-capable model to see your reference images at all.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| idea | STRING | Your short prompt: what should happen in the target video. | |
| task_type | COMBO | Auto (decide from the references) | Square-bracketed prefix of the summary section. Auto lets the model combine types with ' + '. |
| reference_role | COMBO | Auto (decide per image) | How the attached images should be labelled in subject_definitions. |
| duration_seconds | FLOAT | 8.01–60 | — |
| shot_plan | COMBO | Auto | 5 options: Auto, Single shot, Two shots, Three shots, Four shots |
| visual_style | COMBO | Auto | In full-reference mode the style is stated in one or two sentences BEFORE [Shot 1]. |
| wildness | INT | 250–100 | 0 = literal and conservative, 100 = fully unhinged. Above 40 the node also injects concrete surreal elements picked from the seed. |
| word_target | INT | 425150–1200 | Target length of detailed_description. The guide recommends 350-500 words for generation tasks. |
| camera_motion | COMBO | Auto | 21 options: Auto, Static Shot, Zoom In, Zoom Out, Push In, Pull Out, +15 |
| camera_amplitude | COMBO | Auto | 4 options: Auto, with small amplitude, medium (omit), with large amplitude |
| camera_speed | COMBO | Auto | 4 options: Auto, at slow speed, normal (omit), at fast speed |
| include_dialogue | BOOLEAN | true | — |
| dialogue_language | COMBO | English | The language the characters actually speak, and the tag written inside <d>[...]</d>. Auto lets the model pick one that fits the setting. Pick Custom (or just fill in custom_dialogue_language) for anything not listed. |
| include_on_screen_text | BOOLEAN | false | — |
| include_soundscape | BOOLEAN | true | — |
| include_non_diegetic_music | BOOLEAN | true | — |
| model | COMBO | auto-detect | Which LLM writes the rewrite. auto-detect picks the first provider with an API key set, then the Claude Code CLI, then a running local server. claudecode: entries use your Claude Code login instead of an API key; ollama:/lmstudio:/local: entries are whatever your local servers were serving when the page loaded. |
| temperature | FLOAT | 1.000–2 | — |
| seed | INT | -1-1–18446744073709550000 | — |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| reference_notesopt | STRING | Optional per-reference notes, one per line, e.g. 'Image 1: the woman, keep her cardigan'. Also use this to describe video or audio references you cannot attach. | |
| extra_instructionsopt | STRING | — | |
| custom_dialogue_languageopt | STRING | Any language or dialect not in the dropdown, e.g. 'Norwegian (Bergen dialect)' or 'Latin'. Overrides the dropdown when filled in. | |
| model_overrideopt | STRING | Exact provider:model string, used instead of the dropdown when filled in. Handy for a local model the dropdown has not discovered, e.g. 'ollama:qwen3:8b', 'lmstudio:qwen/qwen3-8b' or 'local:my-model'. | |
| local_base_urlopt | STRING | Where to reach the local server, e.g. 'http://192.168.1.10:11434'. Empty uses the default for the chosen prefix: ollama 11434, lmstudio 1234, local 8000. Ignored by the cloud providers. |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| h3_prompt | STRING | — |
| subject_definitions | STRING | — |
| summary | STRING | — |
| retention_analysis | STRING | — |
| detailed_description | STRING | — |
| overall_soundscape | STRING | — |
| non_diegetic_music | STRING | — |
| model_used | STRING | — |