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 about 18 hours ago· 285
APNext H3 Reference Prompt Writer
  • image_1
  • image_2
  • image_3
  • image_4
  • h3_prompt
  • subject_definitions
  • summary
  • retention_analysis
  • detailed_description
  • overall_soundscape
  • non_diegetic_music
  • model_used
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
model_override
local_base_url

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 (28)

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].
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
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
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.
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.

Outputs (8)

NameTypeDescription
h3_promptSTRING
subject_definitionsSTRING
summarySTRING
retention_analysisSTRING
detailed_descriptionSTRING
overall_soundscapeSTRING
non_diegetic_musicSTRING
model_usedSTRING