H3 Video Prompt Creator
MiniMax H3 prompts are a nightmare to hand-write. This node writes them for you.
- first_frame
- last_frame
- h3_prompt
- reference_analysis
- generation_notes
MiniMax H3 is a genuinely good video model - the 33B omni-modal open-weights release that landed in August 2026 with native stereo audio and instantly topped the open-weights I2V charts. The catch is that its prompt format is brutal. The official writing guide demands a three-field JSON-style structure with [Shot N] At MM:SS.mmm timestamps, camera motion as natural prose (never stacked keywords), dialogue inside <d>[Language]</d> blocks, and a separate overall_soundscape and non_diegetic_music field for every clip. Hand-writing that for a 15-second spot is an afternoon of fiddly markup. This node is the shortcut: type the idea in plain English, get a complete, guide-compliant H3 prompt out the other end.
It's the entry point of the ComfyUI-H3-Prompt-Creator pack, and it needs no API key and no model download beyond what Ollama already pulls for you.
How it works
You give it an idea and, optionally, a first_frame and/or last_frame. The node infers which of the four H3 task modes you're in from what's connected:
- no frames → T2VA (text-to-video)
- first frame only → I2VA
- first + last frame → FL2VA (first-and-last interpolation)
- last frame only → L2VA
It then sends your idea (plus the frames, downscaled to 768px on the long edge to keep vision tokens cheap) to a vision-language model with the full Video Prompt Writing Guide baked into its system prompt. Default is qwen3-vl:8b through local Ollama; you can also point it at OpenAI, Anthropic, OpenRouter or Gemini. The clever part is what happens after generation: rules that LLMs reliably ignore - shot timestamps landing outside your duration, missing alignment instructions, wrongly numbered shots - are enforced in code, not just begged for in the prompt. There's even a two-pass mode (enable_reference_analysis, on by default) that runs a separate reference-dossier pass before writing the prompt, at the cost of roughly double the generation time.
The inputs that matter
Most of the widgets you can ignore. The ones worth knowing:
- idea - the only creative input. "A barista pulls a perfect pour, golden hour" is plenty.
- duration - target length in seconds; the node shapes the timeline to it.
- first_frame / last_frame - wire these in when you want an I2V or FL2V task with actual image references.
- num_ctx - leave at 8192. This is the single biggest speed lever (see below).
The h3_prompt output is what you wire into a text loader feeding the H3 sampler. reference_analysis and generation_notes are the inspect-the-work strings: why it chose the mode it did, what it merged, whether it fell back to boilerplate.
Installing
ComfyUI Manager is easiest - search "MiniMax H3 Prompt Creator" and install, then restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/AIJigyasa/ComfyUI-H3-Prompt-Creator
Then restart ComfyUI. There are no pip dependencies - everything talks to backends over plain HTTP. You do need the local model:
ollama pull qwen3-vl:8b
Where people get burned
The num_ctx widget is not decoration. If Ollama sizes the context itself it uses Qwen3-VL's full 262k tokens, which needs ~25 GB of KV cache - on a 12 GB card that means most layers spill to system RAM and a single prompt takes fifteen minutes. Keep it at 8192 and check ollama ps reads 100% GPU. Two other fixes shipped in this pack are worth knowing about: current Ollama builds put Qwen3-VL's answer in message.thinking and leave message.content empty (the node reads whichever is populated), and truncated JSON from hitting max_output_tokens gets repaired rather than discarded.
One caveat that has nothing to do with this node: this writes prompts for H3, but the H3 weights themselves ship under a community licence that excludes the US, EU, UK and Korea. If you're in one of those regions, the hosted Hailuo API is your only licensed path to actually run what it writes.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| idea | STRING | The only creative input you need. The node builds the complete H3 timeline, camera language and audio fields from this idea and any connected frames. | |
| duration | FLOAT | 6.00.1–120 | Target video duration. Used for final-frame alignment when a last frame is connected. |
| first_frameopt | IMAGE | Optional. Connect this to make the node automatically use I2VA (first-frame reference) or FL2VA if a last frame is also connected. | |
| last_frameopt | IMAGE | Optional. Connect this to make the node automatically use L2VA (last-frame reference) or FL2VA if a first frame is also connected. | |
| extra_instructionsopt | STRING | Everything beyond the main idea is optional. Leave blank and the model will fill in the missing cinematic/audio details itself. | |
| 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 (3)
| Name | Type | Description |
|---|---|---|
| h3_prompt | STRING | — |
| reference_analysis | STRING | — |
| generation_notes | STRING | — |