ComfyUI Node

Fantastic H3 Prompt Builder

H3 Wants a Structured Prompt. This Node Writes It For You.

By Adudeguyman·Created 21 days ago·Updated 2 days ago· 125
Fantastic H3 Prompt Builder
  • references
  • picture_1
  • picture_2
  • picture_3
  • picture_4
  • picture_5
  • picture_6
  • picture_7
  • picture_8
  • picture_9
  • video_1
  • video_2
  • video_3
  • video_audio_1
  • video_audio_2
  • video_audio_3
  • audio_1
  • audio_2
  • audio_3
  • prompt
  • picture_1
  • picture_2
  • picture_3
  • picture_4
  • picture_5
  • picture_6
  • picture_7
  • picture_8
  • picture_9
  • video_1
  • video_2
  • video_3
  • video_audio_1
  • video_audio_2
  • video_audio_3
  • audio_1
  • audio_2
  • audio_3
  • references
prompt_text
builder_state{}

Here's the thing nobody tells you about MiniMax H3 before you render: it does not want a casual sentence. It wants a structured prompt with named sections, shot timings, speaker IDs, and tags pointing at your reference media - <Picture 1>, [Shot 2] at 00:03.000, <d>…</d> dialogue blocks, the whole formalism. MiniMax publishes a written guide for that format, and normally a separate rewriting model (H3-Context-IR) turns your rough idea into it.

That rewriter was never open-sourced. So people hand-writing H3 prompts either learned the format by heart or produced garbage and blamed the model.

Fantastic H3 Prompt Builder is the hand-driven replacement: a full editor with fillable templates for every mode, live checking against the guide's rules as you type, and a media loader that keeps your reference tags straight. You write the actual description; it assembles the correctly-formatted prompt underneath. It's the flagship node of the Fantastic H3 Prompt Builder pack and, honestly, the pack's whole reason to exist.

How it works

Click Edit prompt… on the node to open the editor. Pick a mode along the top - T2VA (text to video), I2VA (first frame), FL2VA (first and last), L2VA (last frame), or Reference (any mix of images, video, audio) - and fill in the fields. The finished prompt builds live in the right-hand panel. The editor handles the fixed boilerplate - instruction lines, timing values, section headers - and checks as you go: shot numbering in order, cut times increasing and inside your video's length, dialogue tags balanced, references you connected but never mentioned. Amber warnings save anyway; red errors are worth fixing before you render.

The bundled official guide ships with the pack - the 📖 button opens it in a new tab, searchable and readable on a phone. Everything's click-to-insert: reference media shows as thumbnails, and clicking one drops <Picture 2> into your text at the caret. No typing tags by hand, ever. Beyond the core, the editor has a prompt library (saved as JSON files in your ComfyUI user directory), a draft mode for writing your next prompt while a batch queues, media presets, and non-destructive trim/crop on references.

The inputs that matter

  • prompt_text - the assembled prompt, written by the editor UI. You don't type this directly; the editor writes it.
  • builder_state - hidden JSON holding the editor state (mode, fields, draft). Leave it alone.
  • references - the H3_REFS bundle from the Media Loader, the easiest way in.
  • picture_1…9, video_1…3, video_audio_1…3, audio_1…3 - per-slot media inputs, if you'd rather wire your own loaders. A wired input wins over the bundle; anything else falls back to the loader.

The outputs

The prompt output (STRING) is the star - wire it to the prompt input on MiniMax H3 Image to Video (T2VA/I2VA/FL2VA/L2VA) or MiniMax H3 Reference to Video (reference mode). If prompt shows as a widget rather than an input, right-click and Convert widget to input.

Then one output per media slot - picture_1 through audio_3 - which pass through whatever media that slot holds, gated to the saved mode. Keyframes for I2VA/FL2VA/L2VA go to the native node's first_frame/last_frame inputs, not the ref_images slots. For reference mode, wire picture_1 to ref_image_0 and so on - the native node's slots start at 0, the pack's at 1, so keep them in the same order. There's also a references output (last slot): the same bundle, gated to the saved mode, ready for a Reference Splitter - handy when one loader+builder drives both an fl2va and a ref2va pipeline.

Install

ComfyUI Manager, search "Fantastic H3 Prompt Builder", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Adudeguyman/ComfyUI-Fantastic-MiniMaxH3-PromptBuilder

Then restart ComfyUI completely - nodes only register at startup. Requirements: ComfyUI 0.30.0+, the H3 models (fl2va for text/keyframe work, ref2va for reference mode - ComfyUI's own H3 templates set these up), and PyAV (ComfyUI core already requires it). No API key, no calls out. Note the H3 Community License geofences the weights out of the US, EU, UK, and Korea - that's a model-licensing thing, not this pack's doing.

Common gotchas

  • A reference you connected but never mentioned still affects the render. The editor flags it with an amber dash - either write it into the description or disconnect it.
  • Length mismatch. First/last-frame modes state when the last frame lands, so the length on the native node must match. The editor shows the exact (already-valid) frame count - use it.
  • Nothing changed after an update? ComfyUI caches extension files hard. Hard-refresh with Ctrl+Shift+R, and delete/re-add placed nodes after a big update since old slots stick around.
  • No panel at all (just a builder_state text widget) means the frontend script failed - stale cache, another extension throwing, or a partial install missing web/promptbuilder.js.
  • The pack's 1.6.2 release was a security pass: if you script its endpoints yourself, JSON routes now require Content-Type: application/json (a text/plain body gets a 415).
Categoryconditioning/video_models

Inputs (21)

NameTypeDefaultDescription
prompt_textSTRING
builder_stateSTRING{}
referencesoptH3_REFS
picture_1optIMAGE
picture_2optIMAGE
picture_3optIMAGE
picture_4optIMAGE
picture_5optIMAGE
picture_6optIMAGE
picture_7optIMAGE
picture_8optIMAGE
picture_9optIMAGE
video_1optIMAGE
video_2optIMAGE
video_3optIMAGE
video_audio_1optAUDIO
video_audio_2optAUDIO
video_audio_3optAUDIO
audio_1optAUDIO
audio_2optAUDIO
audio_3optAUDIO

Outputs (20)

NameTypeDescription
promptSTRING
picture_1IMAGE
picture_2IMAGE
picture_3IMAGE
picture_4IMAGE
picture_5IMAGE
picture_6IMAGE
picture_7IMAGE
picture_8IMAGE
picture_9IMAGE
video_1IMAGE
video_2IMAGE
video_3IMAGE
video_audio_1AUDIO
video_audio_2AUDIO
video_audio_3AUDIO
audio_1AUDIO
audio_2AUDIO
audio_3AUDIO
referencesH3_REFS