Nodes/MiniMax H3 Audio T8/MiniMax H3 Prompt Rewriter 8B / 多模态提示词改写 (Advanced)
ComfyUI Node

MiniMax H3 Prompt Rewriter 8B / 多模态提示词改写 (Advanced)

The local 8B prompt rewriter that runs on 16GB and unloads after every use

By T8mars·Created 20 days ago·Updated a day ago· 807
MiniMax H3 Prompt Rewriter 8B / 多模态提示词改写 (Advanced)
  • first_frame
  • last_frame
  • enhanced_prompt
  • integrated_multimodal_description
  • overall_soundscape
  • non_diegetic_music
  • report_json
prompt
taskT2VA — 文生音视频
resolution16:9
duration10
base_model_pathQwen3-VL-8B-Instruct
adapter_pathMiniMax-H3-Prompt-Rewriter-LoRA-8B
load_policyauto_cpu_offload
dtypebfloat16
decodinggreedy
seed42
max_new_tokens1024
temperature0.70
top_p0.80
min_image_pixels65536
max_image_pixels1048576
unload_after_generatetrue
free_comfy_models_before_loadtrue
allow_hub_downloadfalse

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-Instruct by default, resolved relative to ComfyUI/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 from models/loras. Exact upstream: lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA-8B.
  • load_policy - auto_cpu_offload (recommended for 16GB), gpu_only if 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 optional first_frame/last_frame inputs.
  • unload_after_generate (true) and free_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.

CategoryT8/MiniMax H3/Conditioning/Experimental

Inputs (20)

NameTypeDefaultDescription
promptSTRING原始短提示词;对白、歌词和画面文字会要求保持原文。
taskCOMBOT2VA — 文生音视频4 options: T2VA — 文生音视频, I2VA — 首帧生音视频, L2VA — 尾帧生音视频, FL2VA — 首尾帧生音视频
resolutionCOMBO16:97 options: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, +1
durationINT104–15
base_model_pathSTRINGQwen3-VL-8B-Instruct相对路径从 ComfyUI/models/text_encoders 解析,也可填绝对目录。精确基座为 Qwen/Qwen3-VL-8B-Instruct。
adapter_pathSTRINGMiniMax-H3-Prompt-Rewriter-LoRA-8B相对路径从 ComfyUI/models/loras 解析,也可填绝对目录。精确LoRA为 lightx2v/MiniMax-H3-Prompt-Rewriter-LoRA-8B。
load_policyCOMBOauto_cpu_offload16GB显卡建议自动CPU分片;gpu_only需要足够显存。
dtypeCOMBObfloat162 options: bfloat16, float16
decodingCOMBOgreedy2 options: greedy, sample
seedINT420–9223372036854776000
max_new_tokensINT1024128–8192默认1024兼顾完整度与16GB分片速度;过低可能截断三段结构,过高只提高上限而不会强迫模型生成到上限。
temperatureFLOAT0.700.01–2
top_pFLOAT0.800.01–1
min_image_pixelsINT655361024–4194304
max_image_pixelsINT10485761024–16777216
unload_after_generateBOOLEANtrue生成、报错或OOM后都尝试只释放本节点的模型和缓存。
free_comfy_models_before_loadBOOLEANtrue加载8B前释放ComfyUI当前模型,为16GB显卡留空间;不会在生成后全局卸载。
allow_hub_downloadBOOLEANfalse默认只允许本地模型,避免运行时意外下载大文件。
first_frameoptIMAGE
last_frameoptIMAGE

Outputs (5)

NameTypeDescription
enhanced_promptSTRING
integrated_multimodal_descriptionSTRING
overall_soundscapeSTRING
non_diegetic_musicSTRING
report_jsonSTRING