Nodes/SDXL Auto Prompter/APNext H3 Reference Prompt Writer
ComfyUI Node

APNext H3 Reference Prompt Writer

Give MiniMax-H3 reference images a spec-compliant prompt (six sections)

By dagthomas·Created 3 years ago·Updated 7 days ago· 290
APNext H3 Reference Prompt Writer
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • image_9
  • h3_prompt
  • subject_definitions
  • summary
  • retention_analysis
  • detailed_description
  • overall_soundscape
  • non_diegetic_music
  • model_used
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • image_9
idea
task_typeAuto (decide from the references)
reference_roleAuto (decide per image)
duration_seconds8.0
shot_planAuto
visual_styleAuto
wildness25
word_target425
camera_motionAuto
camera_amplitudeAuto
camera_speedAuto
include_dialoguetrue
dialogue_languageEnglish
include_on_screen_textfalse
include_soundscapetrue
include_non_diegetic_musictrue
modelauto-detect
temperature1.00
seed-1
reference_notes
extra_instructions
custom_dialogue_language
custom_visual_style
model_override
local_base_url
context_1
context_2
context_3
context_4
context_5
context_6
context_7
context_8

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_1image_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 for detailed_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_role is labelling it the way you intend, and use reference_notes to 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.
Categorycomfyui_dagthomas/H3

Inputs (42)

NameTypeDefaultDescription
ideaSTRINGYour short prompt: what should happen in the target video.
task_typeCOMBOAuto (decide from the references)Square-bracketed prefix of the summary section. Auto lets the model combine types with ' + '.
reference_roleCOMBOAuto (decide per image)How the attached images should be labelled in subject_definitions.
duration_secondsFLOAT8.01–60
shot_planCOMBOAuto5 options: Auto, Single shot, Two shots, Three shots, Four shots
visual_styleCOMBOAutoIn full-reference mode the style is stated in one or two sentences BEFORE [Shot 1]. The list is the guide's styles plus the APNext Cinematic vocabulary (film stock, grading, aesthetics); pick Custom and fill in custom_visual_style to write your own.
wildnessINT250–1000 = literal and conservative, 100 = fully unhinged. Above 40 the node also injects concrete surreal elements picked from the seed.
word_targetINT425150–1200Target length of detailed_description. The guide recommends 350-500 words for generation tasks.
camera_motionCOMBOAuto21 options: Auto, Static Shot, Zoom In, Zoom Out, Push In, Pull Out, +15
camera_amplitudeCOMBOAuto4 options: Auto, with small amplitude, medium (omit), with large amplitude
camera_speedCOMBOAuto4 options: Auto, at slow speed, normal (omit), at fast speed
include_dialogueBOOLEANtrue
dialogue_languageCOMBOEnglishThe 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_textBOOLEANfalse
include_soundscapeBOOLEANtrue
include_non_diegetic_musicBOOLEANtrue
modelCOMBOauto-detectWhich 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.
temperatureFLOAT1.000–2
seedINT-1-1–18446744073709550000
reference_notesoptSTRINGOptional 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_instructionsoptSTRING
custom_dialogue_languageoptSTRINGAny language or dialect not in the dropdown, e.g. 'Norwegian (Bergen dialect)' or 'Latin'. Overrides the dropdown when filled in.
custom_visual_styleoptSTRINGAny visual style not in the dropdown, e.g. 'hand-painted cel animation' or 'Kodak Vision3 500T, anamorphic'. Overrides the dropdown when filled in.
model_overrideoptSTRINGExact 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_urloptSTRINGWhere 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.
context_1optSTRINGSteering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them.
context_2optSTRINGSteering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them.
context_3optSTRINGSteering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them.
context_4optSTRINGSteering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them.
context_5optSTRINGSteering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them.
context_6optSTRINGSteering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them.
context_7optSTRINGSteering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them.
context_8optSTRINGSteering input from another APNext node (Time, Scene, Poses, Plots, Feelings, Cinematic, Science, Geography, Architecture, Fashion, ...). The node detects which kind it is and tells Claude how to use it. Sockets grow as you connect them.
image_1optIMAGEReference image 1: <Picture 1> in the prompt. Connect the same image to image_1 on the MiniMax H3 Reference to Video node, or use this node's image_1 output.
image_2optIMAGEReference image 2: <Picture 2> in the prompt. Connect the same image to image_2 on the MiniMax H3 Reference to Video node, or use this node's image_2 output.
image_3optIMAGEReference image 3: <Picture 3> in the prompt. Connect the same image to image_3 on the MiniMax H3 Reference to Video node, or use this node's image_3 output.
image_4optIMAGEReference image 4: <Picture 4> in the prompt. Connect the same image to image_4 on the MiniMax H3 Reference to Video node, or use this node's image_4 output.
image_5optIMAGEReference image 5: <Picture 5> in the prompt. Connect the same image to image_5 on the MiniMax H3 Reference to Video node, or use this node's image_5 output.
image_6optIMAGEReference image 6: <Picture 6> in the prompt. Connect the same image to image_6 on the MiniMax H3 Reference to Video node, or use this node's image_6 output.
image_7optIMAGEReference image 7: <Picture 7> in the prompt. Connect the same image to image_7 on the MiniMax H3 Reference to Video node, or use this node's image_7 output.
image_8optIMAGEReference image 8: <Picture 8> in the prompt. Connect the same image to image_8 on the MiniMax H3 Reference to Video node, or use this node's image_8 output.
image_9optIMAGEReference image 9: <Picture 9> in the prompt. Connect the same image to image_9 on the MiniMax H3 Reference to Video node, or use this node's image_9 output.

Outputs (17)

NameTypeDescription
h3_promptSTRING
subject_definitionsSTRING
summarySTRING
retention_analysisSTRING
detailed_descriptionSTRING
overall_soundscapeSTRING
non_diegetic_musicSTRING
model_usedSTRING
image_1IMAGE
image_2IMAGE
image_3IMAGE
image_4IMAGE
image_5IMAGE
image_6IMAGE
image_7IMAGE
image_8IMAGE
image_9IMAGE