MiniMax H3 Prompt (Qwen) Two-Stage
How to see what the LLM was thinking
- image1
- image2
- image3
- image4
- video
- stage1_prompt
- positive_prompt
- negative_prompt
The plain MiniMax H3 Prompt (Qwen) node is a black box: one line in, formatted H3 prompt out, and if you don't like the result you have no idea where it went sideways. The Two-Stage node exists for people who want to see and steer the middle. It runs the rewrite in two passes and exposes the intermediate result as its own output - which makes debugging a lot less guessy.
It's the same pack and the same underlying Qwen GGUF, but the workflow is: your description (plus optional reference images or video) gets turned into a free-form, detailed creative prompt first, and that gets rewritten into strict H3 format second. You can inspect the first stage, tweak your rules, and rerun until the creative direction is right - then let stage two worry about integrated_multimodal_description and friends.
How it works
Stage one uses your rule_text as the system prompt - or a built-in default "professional video prompt engineer" rule if you leave it empty - and asks the model for a detailed, creative description emphasizing subject, action, scene, camera movement and atmosphere. If you've wired in reference images or a video, they're sent along as base64 for a vision Qwen to incorporate.
Stage two throws that stage-one prompt into the official H3 guide (the same embedded h3-prompt-writing system prompt the other nodes use) and rewrites it into the exact output format, with your chosen mode, duration, style, aspect ratio and audio preference as context. It also preserves the pack's hard rule: any dialogue or lyrics that appeared in the stage-one prompt stay verbatim in the original language, never translated.
The inputs that matter
- rule_text - the stage-one system prompt. Leave it empty for the default, or plug in the
selected_ruleoutput of the pack's MiniMax H3 Rule Library (10) node to switch between custom writing personas by index. That pairing is the intended use. - mode - defaults to
Autohere, which lets stage two pick an appropriate H3 mode from the content rather than forcing one. ExplicitI2VA/FL2VA/L2VA/Ref2VAoverride it. - image1–image4, video - optional references for stage one, same multimodal behavior as the pack's Multimodal node. If you feed visuals, you need a vision model with an
mmprojprojector and a realchat_handler. - max_frames / max_size - reference-video sampling count and the downscale limit for encoded frames.
Three outputs come out: stage1_prompt (wire it to a text display node and you can actually read the creative pass), positive_prompt, and negative_prompt for the H3 generation node.
Installing it
Shared with the rest of the pack - nothing extra to do if you already run the other nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/wangminxing2019/ComfyUI-MiniMaxH3-QwenPrompt.git
git clone https://github.com/JamePeng/ComfyUI-llama-cpp_vlm.git
Restart, and make sure a Qwen GGUF is in ComfyUI/models/LLM. Text-only use takes any Qwen GGUF; feeding images requires the vision variant plus mmproj.
Gotchas worth knowing
- It's two inference passes - double the latency, double the tokens, and two chances for the model to drift off the rails. If you don't need to see the middle, the single-pass node is faster and honestly fine.
- Watch stage-one rules - a rule that asks for a huge amount of detail produces a huge stage-one prompt, which eats context in stage two. Keep the rule focused on direction, not exhaustiveness.
- The dialogue rule survives the rewrite - the pack hardcodes "never translate dialogue," so if you wrote Chinese dialogue, it stays Chinese through both passes, as H3's format demands.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | 1 options: (未找到模型,请检查 models/LLM 目录) | |
| mmproj | COMBO | None | 1 options: None |
| chat_handler | COMBO | Qwen3.5 | 20 options: None, LLaVA-1.5, LLaVA-1.6, Moondream2, nanoLLaVA, llama3-Vision-Alpha, +14 |
| n_ctx | INT | 81921024–327680 | 上下文长度限制 |
| rule_text | STRING | — | |
| user_prompt | STRING | — | |
| mode | COMBO | Auto | 第二阶段 H3 格式的模式,Auto 按图片数量自动判断 |
| style | COMBO | cinematic | 8 options: cinematic, live-action, 2D-animated, 3D CG, claymation, watercolor, +2 |
| duration | INT | 104–15 | 视频时长(秒) |
| aspect_ratio | COMBO | 16:9 | 3 options: 16:9, 9:16, 1:1 |
| include_audio | BOOLEAN | true | 是否在提示词中包含环境音和 BGM 描述 |
| seed | INT | 00–18446744073709550000 | — |
| max_tokens | INT | 20480–8192 | — |
| temperature | FLOAT | 0.800–2 | — |
| top_p | FLOAT | 0.900–1 | — |
| top_k | INT | 300–1000 | — |
| max_frames | INT | 162–128 | 视频参考采样帧数 |
| max_size | INT | 512128–4096 | 图片/视频帧最大边长 |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| videoopt | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| stage1_prompt | STRING | — |
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |