H3 Full-Reference Video Prompt Creator
The H3 node for when a clip needs to match a reference — images, video and audio
- reference_video
- reference_audio
- reference_image_1
- reference_image_2
- reference_image_3
- reference_image_4
- reference_image_5
- reference_image_6
- h3_prompt
- reference_analysis
- audio_analysis
- generation_notes
H3's full-reference mode is what makes the model feel like Kling: give it a character, a clip or a track, and it generates something that genuinely references it - same person, same motion, same audio - instead of a vaguely similar new video. The mechanism is label bookkeeping. A full-reference prompt is built from <Subject N>, <Picture N>, <Video N> and <Audio N> tags, where each subject is defined once ("<Subject 1> is the woman whose face comes from <Picture 1> and whose walking motion comes from <Video 1>"), every reference gets a retention marker, and the whole thing is laid out in exactly six sections. Doing that by hand, with six reference images and a soundtrack, is where even careful people produce garbage. This node does it for you.
It's the heavyweight sibling of the H3 Video Prompt Creator in the same pack, and it's the one you reach for when the job is video editing, continuation, V2V motion transfer, or character consistency across shots.
How it works
Two passes. First, a reference-dossier pass: each connected asset gets analyzed in its own model request. That one-per-asset design exists because of a real failure mode - feed a multi-pose contact sheet in one batch and the vision model counts each pose as a separate person, then restates the same description until its token budget dies. One request per asset, a hard cap of three subjects per asset and six global, and near-identical subject definitions merged in code afterwards. Second pass writes the actual six-section prompt.
Reference video is sampled into frames for the vision model. Reference audio is never sent to the model at all - Qwen3-VL can't hear tensors. Instead, faster-whisper transcribes speech and lyrics with timestamps, librosa pulls tempo and spectral/RMS features, and the text evidence goes to the model. That's why the pack ships with no Python dependencies by default: transcription and audio analysis are opt-in, because faster-whisper and librosa are big installs.
Inputs worth setting
- idea + target_duration - your only required fields. The duration shapes the shot timeline.
- reference_image_1..6, reference_video, reference_audio - the references themselves.
- reference_intent - leave on Auto; the node infers the task type (keyframe completion, video editing, audio reuse…) from what you connected. There are six explicit choices if it gets it wrong.
- audio_transcript_or_notes - for exact lyrics or dialogue that must survive verbatim. Don't assume the node can hear the audio; type the words here.
- whisper_model / whisper_device / enable_audio_transcription - only do anything once you've installed the audio extras.
Outputs: h3_prompt (wire to the H3 sampler), plus reference_analysis, audio_analysis and generation_notes so you can see the dossier it built and how it reasoned.
Installing
Same pack, same steps - ComfyUI Manager, search "MiniMax H3 Prompt Creator", restart. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/AIJigyasa/ComfyUI-H3-Prompt-Creator
Without the audio extras the node works fine and just reports transcription as unavailable. To enable it:
pip install -r requirements-audio.txt
That file is deliberately not called requirements.txt, because ComfyUI Manager auto-installs that name and would turn every install into a heavy one. Audio analysis needs faster-whisper, librosa, soundfile; FFmpeg on PATH for pulling audio out of reference videos.
Where people get burned
The classic failure is the character sheet: a turnaround or collage of the same person in different poses, and suddenly subject_definitions has twenty-seven copies of one woman. The pack's defenses are the per-asset analysis, subject caps, and code-side merging - check generation_notes to see the merge count. If references are simple, turning off enable_reference_analysis halves your time. And remember the num_ctx story from the rest of this pack: keep it at 8192 or Ollama sizes a 262k-token context that offloads your 8B model to CPU. On an RTX 3060 with Qwen3-VL at 8192 context, three reference images run about 50 seconds end to end - much slower than that means check ollama ps for CPU offload first.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| idea | STRING | Simple target idea. The node uses it together with any connected reference images, video and audio to write the complete six-section H3 full-reference prompt. | |
| target_duration | FLOAT | 6.00.1–120 | Target duration used to shape the generated timeline. If reference video duration is available, Ollama also receives it as evidence. |
| reference_videoopt | VIDEO | Optional full reference video. Sampled frames are sent to Ollama; the source is represented as <Video 1> in the H3 prompt. | |
| reference_audioopt | AUDIO | Optional reference audio. Local faster-whisper transcribes speech/lyrics and librosa extracts audio/music features; exact user notes can override ambiguity. | |
| reference_image_1opt | IMAGE | Optional picture reference 1. Automatically represented as <Picture 1> unless Ollama determines another H3 reference role. | |
| reference_image_2opt | IMAGE | Optional picture reference 2. | |
| reference_image_3opt | IMAGE | Optional picture reference 3. | |
| reference_image_4opt | IMAGE | Optional picture reference 4. | |
| reference_image_5opt | IMAGE | Optional picture reference 5. | |
| reference_image_6opt | IMAGE | Optional picture reference 6. | |
| reference_intentopt | COMBO | Auto | Optional hint. Auto is recommended: the node infers the task type from the connected references and notes. |
| reference_notesopt | STRING | Optional clarification. Leave blank when the references and simple idea are self-explanatory. | |
| audio_transcript_or_notesopt | STRING | Ollama itself is not assumed to hear arbitrary AUDIO tensors. Put exact lyrics/dialogue here when they must be preserved verbatim. | |
| provideropt | COMBO | Ollama (Local) | Ollama (Local) runs on your machine and needs no key. OpenAI, Anthropic, OpenRouter and Google Gemini are hosted APIs and need api_key + api_model. Built-in deterministic skips the model entirely. |
| api_keyopt | STRING | Key for the hosted providers. Leave blank to read OPENAI_API_KEY, ANTHROPIC_API_KEY, OPENROUTER_API_KEY or GEMINI_API_KEY from the environment — safer, because a key typed here is saved into the workflow JSON and travels with it if you share the workflow. | |
| api_modelopt | STRING | Model for the hosted providers; ignored by Ollama. Blank uses the default: OpenAI gpt-4o, Anthropic claude-opus-5, OpenRouter anthropic/claude-sonnet-5, Gemini gemini-2.0-flash. Must be a vision model when you connect reference images. | |
| ollama_urlopt | STRING | http://127.0.0.1:11434 | Ollama server base URL. |
| ollama_modelopt | COMBO | qwen3-vl:8b | Vision-capable local model, listed from your running Ollama server. Use the Refresh Ollama Models button after pulling a new model. |
| temperatureopt | FLOAT | 0.250–1.2 | Lower values improve H3 schema adherence. |
| keep_aliveopt | COMBO | 10m | Keep the local Ollama model loaded between requests. |
| request_timeoutopt | INT | 60030–3600 | Maximum Ollama request time in seconds. |
| max_output_tokensopt | INT | 4096256–12000 | Maximum generated tokens. H3 full-reference descriptions benefit from 4096+. |
| num_ctxopt | COMBO | 8192 | Ollama context window. CRITICAL for speed: left unset, Ollama sizes the context from the model maximum (262144 for Qwen3-VL), which needs ~25 GB of KV cache and pushes most layers onto the CPU. 8192 keeps an 8B model fully on a 12 GB GPU. Raise it only when you connect many reference images. |
| enable_reference_analysisopt | BOOLEAN | true | Run the separate reference-dossier pass before writing the prompt. Turn off to halve generation time when references are simple. |
| whisper_modelopt | COMBO | small | Local faster-whisper model used for dialogue/lyrics transcription. Small is the recommended quality/speed balance. |
| whisper_deviceopt | COMBO | auto | Device for faster-whisper. |
| enable_audio_transcriptionopt | BOOLEAN | true | Run faster-whisper when audio is connected (or embedded in the reference video). |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| h3_prompt | STRING | — |
| reference_analysis | STRING | — |
| audio_analysis | STRING | — |
| generation_notes | STRING | — |