MiniMax H3 Prompt Rewriter 8B / 多模态提示词改写 (Advanced)
The local 8B prompt rewriter that runs on 16GB and unloads after every use
- first_frame
- last_frame
- enhanced_prompt
- integrated_multimodal_description
- overall_soundscape
- non_diegetic_music
- report_json
MiniMax H3's own text encoder is a 32B Qwen3-VL, and you can't LoRA a good rewrite habit into it - its parameter shape won't take the community's prompt-rewriting LoRA. MiniMaxH3PromptRewriter8BT8Advanced is the pack's answer: it runs a separate, dedicated Qwen3-VL-8B model with the pinned LightX2V MiniMax-H3-Prompt-Rewriter-LoRA-8B adapter, produces the same three-field structured rewrite the pack uses everywhere, and then unloads - by default it frees the model and cache after every generation, error, or OOM. A 16GB card can actually run this, though the README's verdict on CPU offloading is honest: it works and produces structured results, but it's slow.
Why a separate model? Because "their parameter shapes are not LoRA-compatible" - the description says it in so many words. The 32B CLIP is doing encoding duty for generation; you don't want a rewriter LoRA grafted onto it. The 8B is a sidecar: load, rewrite, unload.
The inputs that matter
prompt- the raw short prompt. Dialogue, lyrics, and on-screen text are required to stay verbatim (the tooltip says so), which is how a rewrite doesn't quietly change your character's lines.task(T2VA default),resolution,duration- the same contract shape as the provider router.base_model_path-Qwen3-VL-8B-Instructby default, resolved relative toComfyUI/models/text_encoders(absolute paths also allowed). The precise base is Qwen/Qwen3-VL-8B-Instruct.adapter_path-MiniMax-H3-Prompt-Rewriter-LoRA-8B, resolved frommodels/loras. Exact upstream:lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA-8B.load_policy-auto_cpu_offload(recommended for 16GB),gpu_onlyif you have headroom.dtype(bfloat16),decoding(greedy),seed(42),temperature(0.7),top_p(0.8).max_new_tokens- 1024 default. Too low and the three-field structure gets truncated; too high just raises the ceiling, it doesn't force the model to fill it.min_image_pixels/max_image_pixels- the VLM's image resolution window for the optionalfirst_frame/last_frameinputs.unload_after_generate(true) andfree_comfy_models_before_load(true) - the two VRAM-hygiene switches; the latter frees current ComfyUI models before the 8B loads so a 16GB card has room, without a global unload afterwards.allow_hub_download- false by default, and that default is the feature: the node refuses surprise downloads of multi-GB files at runtime. If you haven't pre-downloaded the base and adapter, it errors locally instead of silently pulling them.
Outputs: enhanced_prompt, integrated_multimodal_description, overall_soundscape, non_diegetic_music, report_json.
The install that's actually different
This is the one node in the pack with real extra dependencies. From the README, only install them if you're using the rewriter, and install into ComfyUI's Python:
cd ComfyUI/custom_nodes/minimax-h3-audio-T8
pip install -r requirements-prompt-rewriter.txt
The file pins a conservative stack - transformers>=4.57.1,<5, accelerate, peft>=0.18,<0.21, safetensors, pillow>=10,<11 - deliberately constrained so installing this doesn't yank versions other nodes depend on. You also need the Qwen3-VL-8B base and the LightX2V LoRA on disk (models/text_encoders and models/loras respectively), because allow_hub_download won't fetch them for you. The pack itself otherwise installs plain: Manager search "MiniMax H3 Audio T8", or clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8, restart. Template: examples/workflows/14-prompt-relay/2026-08-22_H3_Prompt_Rewriter_8B_Advanced_EXP.json. It's a genuinely useful sidecar, but it's the slow, model-hauling one - budget for it.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | 原始短提示词;对白、歌词和画面文字会要求保持原文。 | |
| task | COMBO | T2VA — 文生音视频 | 4 options: T2VA — 文生音视频, I2VA — 首帧生音视频, L2VA — 尾帧生音视频, FL2VA — 首尾帧生音视频 |
| resolution | COMBO | 16:9 | 7 options: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, +1 |
| duration | INT | 104–15 | — |
| base_model_path | STRING | Qwen3-VL-8B-Instruct | 相对路径从 ComfyUI/models/text_encoders 解析,也可填绝对目录。精确基座为 Qwen/Qwen3-VL-8B-Instruct。 |
| adapter_path | STRING | MiniMax-H3-Prompt-Rewriter-LoRA-8B | 相对路径从 ComfyUI/models/loras 解析,也可填绝对目录。精确LoRA为 lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA-8B。 |
| load_policy | COMBO | auto_cpu_offload | 16GB显卡建议自动CPU分片;gpu_only需要足够显存。 |
| dtype | COMBO | bfloat16 | 2 options: bfloat16, float16 |
| decoding | COMBO | greedy | 2 options: greedy, sample |
| seed | INT | 420–9223372036854776000 | — |
| max_new_tokens | INT | 1024128–8192 | 默认1024兼顾完整度与16GB分片速度;过低可能截断三段结构,过高只提高上限而不会强迫模型生成到上限。 |
| temperature | FLOAT | 0.700.01–2 | — |
| top_p | FLOAT | 0.800.01–1 | — |
| min_image_pixels | INT | 655361024–4194304 | — |
| max_image_pixels | INT | 10485761024–16777216 | — |
| unload_after_generate | BOOLEAN | true | 生成、报错或OOM后都尝试只释放本节点的模型和缓存。 |
| free_comfy_models_before_load | BOOLEAN | true | 加载8B前释放ComfyUI当前模型,为16GB显卡留空间;不会在生成后全局卸载。 |
| allow_hub_download | BOOLEAN | false | 默认只允许本地模型,避免运行时意外下载大文件。 |
| first_frameopt | IMAGE | — | |
| last_frameopt | IMAGE | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| enhanced_prompt | STRING | — |
| integrated_multimodal_description | STRING | — |
| overall_soundscape | STRING | — |
| non_diegetic_music | STRING | — |
| report_json | STRING | — |