Nodes/H3 Multishot Advance/Multishot Advance Prompt Builder
ComfyUI Node

Multishot Advance Prompt Builder

The H3 Prompt Builder

By KursatAs·Created 28 days ago·Updated 14 days ago· 5
Multishot Advance Prompt Builder
  • cartridge_metadata
  • script_out
  • shot_count_out
  • prompt_builder_state
  • project_name_out
  • global_prompt_out
  • reference_subjects_out
  • report
  • compiled_preview
project_nameMy_MultiShot_Advance_Project
project_picker(manual / new project_name)
subject_namethe woman in Picture 1
identity_modesubject_definitions + retention_analysis
prompt_contractauto
task_modeauto
reference_images1
reference_image_groups
reference_image_roleoff
reference_videos0
reference_video_rolevideo_structure_reference
reference_video_audio_rolevoice_timbre_reference
reference_audios0
global_placementevery_shot
style_presetOff
shot_templateOff
camera_presetOff
shot_count0
speech_policyauto
subject_descriptiondefined by her exact facial identity, facial structure, facial features, eyes, nose, mouth, jawline, skin appearance, hair, hairstyle, and overall visual identity. Her face and identity must remain unmistakably identical to <Picture 1> throughout the entire video.
retention_focusher exact identity, face, hair, hairstyle, physical proportions, wardrobe identity, lighting continuity and overall visual consistency
secondary_subjects
global_prompt
style_prompt
soundscape_prompt
music_prompt
shot_script
external_prompt_import_hash
external_prompt_import_payload
external_prompt_input

MiniMax H3's full-reference prompt contract is a beast: six official sections in a fixed order - subject_definitions, summary, retention_analysis, detailed_description, overall_soundscape, non_diegetic_music - with labels that must match the actual runtime references or the sampler rejects the whole prompt. Hand-writing that for every shot of a long sequence is a recipe for undefined_subject_reference errors at 11pm. This node exists so you don't.

The idea: define the character once (identity, retention rules, global scene notes, visual style), then write only the per-clip action beats in shot_script. The builder assembles the official contract, lints it, and hands you a compiled_preview to eyeball before anything renders.

How it works

Think of it as the authoring half of the pipeline. It can connect directly to the sampler for session-only work, or pass through the Project node so its editable fields persist across restarts:

Multishot Advance Prompt Builder.script_out       -> Multishot Advance Sampler.script
Multishot Advance Prompt Builder.shot_count_out   -> Multishot Advance Sampler.shot_count
Multishot Advance Prompt Builder.reference_subjects_out -> Multishot Advance Sampler.reference_subjects
Multishot Advance Prompt Builder.compiled_preview -> Multishot Advance Markdown Preview.text

Two intent settings matter up top. prompt_contract (auto/base/full_reference) records authoring intent - auto picks full-reference only when you've declared reference items, but the sampler always validates the result against what's actually connected at render time, so the builder's intent is never trusted blindly. task_mode (auto/T2VA/I2VA/FL2VA/L2VA) likewise records intent; the sampler resolves the real task from actual first_frame/last_frame tensors, not from what you clicked.

The inputs a beginner actually sets

There are a lot of fields, but the ones you'll touch every session:

  • subject_name - short name/role for <Subject 1> ("the woman in Picture 1" by default). Keep it short; the detail goes in subject_description.
  • subject_description - the actual identity: face, hair, skin, wardrobe, distinctive details. The builder adds the "is" and wraps it - don't write <Subject 1> is yourself.
  • retention_focus - what the retention_analysis block tells H3 to preserve across clips. Defaults to identity/face/hair/lighting, which is right for most runs.
  • shot_script - the per-clip action beats. One target clip per --- block; real camera cuts inside a clip go as [Shot 1], [Shot 2], with official cut timestamps.
  • reference_images + reference_image_groups - how many <Picture N> items the prompt names, and how they group into people. "3,3" means pictures 1-3 are Subject 1 and 4-6 are Subject 2. This must match what you actually wire to the sampler, or you'll get the warning below.
  • global_prompt, style_prompt, soundscape_prompt, music_prompt - shared world/continuity notes, cinematography, and the soundscape/music section bodies.

The presets (style_preset, camera_preset, shot_template, speech_policy) are all default-off and genuinely optional. force_silent, for instance, adds positive closed-mouth performance and environmental soundscape wording when you want a deliberately silent clip - it does not append "no dialogue" negative prose, which H3 doesn't want.

Outputs: script_out, shot_count_out, prompt_builder_state (wire to the Project node to persist the builder's fields), project_name_out, reference_subjects_out, report (lint warnings), and compiled_preview - the exact final prompt as markdown.

Installing it

Ships in the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/KursatAs/ComfyUI-H3-Multishot-Advance

Restart ComfyUI. No extra downloads.

Common issues

The classic error is undefined_subject_reference ... <Subject 2>: the script uses Subject 2 but subject_definitions only established Subject 1. Fix by checking reference_images counts, the runtime image batch, reference_image_groups, and that secondary_subjects has one non-empty description line per extra person. A close cousin is a nested section header - if a body field contains something like detailed_description: as text, remove it; the builder generates the wrappers. And the recurring theme across all of it: the builder's declared counts are editable intent, the sampler reads the actual tensors, and when they disagree it falls back to the runtime contract with a warning - recoverable, but align them anyway to avoid surprise label assignments.

Categoryconditioning/minimax

Inputs (31)

NameTypeDefaultDescription
project_nameSTRINGMy_MultiShot_Advance_ProjectProject name used by the load button and usually wired to Multishot Advance Project.project_name_override.
project_pickerCOMBO(manual / new project_name)Existing Multishot Advance projects. Select one to set project_name without typing, then use Load project prompts to refill this builder from project.json.
subject_nameSTRINGthe woman in Picture 1Short human-readable name/role for <Subject 1>. Keep this short; put the detailed identity text in subject_description.
identity_modeCOMBOsubject_definitions + retention_analysisStructured mode writes MiniMax-H3 subject and retention blocks. Plain mode only prepends the description as text.
prompt_contractCOMBOautoBuilder intent only. auto selects full_reference when declared refs exist, otherwise base. The Sampler validates the final contract from actual runtime tensors and references.
task_modeCOMBOautoBase task intent stored in builder/project state. The Sampler resolves T2VA/I2VA/FL2VA/L2VA from actual first/last-frame tensors.
reference_imagesINT10–16How many <Picture N> references the prompt should name. Match the images wired to the sampler.
reference_image_groupsSTRINGOptional multi-person picture grouping, same format as sampler reference_subjects. Example: '3,3' means pictures 1-3 are <Subject 1>, 4-6 are <Subject 2>.
reference_image_roleCOMBOoffGlobal H3 transport role for <Picture N> items. Semantic bindings control contributed facets but do not change tensor transport. Identity-only pictures stay inside their <Subject N> source; concrete first/last frame and storyboard roles get standalone definitions. The Sampler validates the actual runtime role and tensor binding.
reference_videosINT00–4How many <Video N> references the prompt should name.
reference_video_roleCOMBOvideo_structure_referenceExplicit role for declared <Video N> items. Only video_continuation_source produces the video continuation task type.
reference_video_audio_roleCOMBOvoice_timbre_referenceAudio role independent from reference_video_role. Voice timbre enters only clips with structured or explicit foreground speech; ambience, rhythm and copy roles can condition silent clips. off ignores the paired reference_video_audio signal.
reference_audiosINT00–4How many <Audio N> references the prompt should name.
global_placementCOMBOevery_shotevery_shot is best for separate H3 clips. first_shot_only keeps later prompts shorter but identity may drift.
style_presetCOMBOOffOptional style preset bank. Off means the builder adds no preset text and you stay fully manual.
shot_templateCOMBOOffOptional shot formatting. Off preserves pure manual shot text only when no builder global/identity/silent/anchor guidance is active; otherwise H3 official description sections are used.
camera_presetCOMBOOffOptional camera preset applied to each effective shot. Off means camera wording is left entirely to shot_script.
shot_countINT00–1000 = use the parsed independent clip count. A higher value repeats the last clip; a lower value renders only the first requested clips.
speech_policyCOMBOautoauto lets shot text decide speech. force_silent adds positive closed-mouth performance and environmental soundscape wording. allow_dialogue keeps explicit dialogue cues active.
subject_descriptionSTRINGdefined by her exact facial identity, facial structure, facial features, eyes, nose, mouth, jawline, skin appearance, hair, hairstyle, and overall visual identity. Her face and identity must remain unmistakably identical to <Picture 1> throughout the entire video.Identity description derived from the reference image/video: face, hair, skin, wardrobe, posture, age range, distinctive details. Do not write '<Subject 1> is' here; the builder adds it.
retention_focusSTRINGher exact identity, face, hair, hairstyle, physical proportions, wardrobe identity, lighting continuity and overall visual consistencyWhat the retention_analysis block tells H3 to preserve across clips. Write a concise subject-specific phrase or statement placed after 'Continuity focus:'; place scene or location continuity in global_prompt. Do not write 'retention_analysis:' here; the builder adds it.
secondary_subjectsSTRINGOptional: one extra subject description per line. They become <Subject 2>, <Subject 3>, ...
global_promptSTRINGWorld, location, character rules or continuity notes shared by all shots.
style_promptSTRINGCinematography, lens, lighting, colour and motion style shared by all shots.
soundscape_promptSTRINGOptional overall_soundscape text used by H3 shot templates. Empty uses a conservative automatic soundscape.
music_promptSTRINGOptional non_diegetic_music text used by H3 shot templates. Empty becomes N/A.
shot_scriptSTRINGWrite one target video clip per --- block. Inside a clip, keep real camera cuts as [Shot 1], [Shot 2], [Shot 3] with official cut timestamps.
external_prompt_import_hashSTRINGInternal one-shot import marker. The frontend keeps this hidden.
external_prompt_import_payloadSTRINGInternal lossless External Importer state. The frontend keeps this field hidden; editing any imported Builder field safely disables its stale override.
external_prompt_inputoptSTRINGOptional STRING socket for AI Scenario Director output or another external prompt. A new connected prompt is imported into editable Prompt Builder fields on the first Run; downstream execution is blocked until the user runs the workflow again.
cartridge_metadataoptMULTISHOT_ADVANCE_CARTRIDGE_METADATATyped metadata from Multishot Advance Cartridge Loader. It supplies label-free identity prose; actual Picture/Audio labels still come from wired runtime references and the central registry.

Outputs (8)

NameTypeDescription
script_outSTRING
shot_count_outINT
prompt_builder_stateMULTISHOT_ADVANCE_PROMPT_BUILDER_STATE
project_name_outSTRING
global_prompt_outSTRING
reference_subjects_outSTRING
reportSTRING
compiled_previewSTRING