MiniMax H3 Prompt Provider Router / 提示词服务路由 (Advanced/T8)
Prompt enhancement with zero network by default — and guarded keys if you opt in
- first_frame
- last_frame
- enhanced_prompt
- integrated_multimodal_description
- overall_soundscape
- non_diegetic_music
- report_json
Most "prompt enhancer" nodes phone home with your prompt the moment you hit run. MiniMaxH3PromptProviderRouterT8Advanced takes the opposite posture: the default provider_mode is local_passthrough - 本地原文直通, which means your prompt goes through untouched and nothing touches the network. The node exists to give you options, and every option that leaves your machine has to earn its way past a series of explicit gates.
The rewriting contract it uses is the pinned H3 three-field structure - integrated_multimodal_description, overall_soundscape, and non_diegetic_music - the same shape the pack's 8B rewriter produces. So whether you use the local 8B model, a local OpenAI-compatible server, or Ollama, the output has the same shape and slots into the same downstream wiring.
The security design is the feature
This is a category where the KB's warning is worth repeating: an API-wrapper node is exactly the shape of thing that's been weaponized in this ecosystem - a node whose whole job is to send your prompt and key somewhere doesn't look suspicious. This node's defensive checklist:
- Keys come from environment variables only -
api_key_envtakes a variable name, and the tooltip is explicit: "never paste the secret value here." confirm_provider_requestdefaults tofalse- the network path needs an explicit flip.allow_remote_endpointdefaults tofalse, and non-loopback endpoints require HTTPS.- Empty
endpointmeans localhost:127.0.0.1:1234for OpenAI-compatible (LM Studio, llama.cpp),127.0.0.1:11434for Ollama. strict_output_contract(default true) means the provider must return the exact contracted shape - and the README details a genuinely clever trick: your<d>dialogue is replaced with untraceable placeholder tokens before the request, and the provider only gets your real dialogue back if it returns the unique token verbatim in the right position. Real dialogue never gets uploaded as a side effect.contract_repair_attemptsdefaults to 0 to preserve old request counts; if you raise it (max 2) retries don't resend images.ollama_keep_alivedefaults to"0", asking Ollama to unload the model after the response.
The rest of the inputs
task (T2VA default), resolution, duration (4–15s), provider_model (local-model), max_new_tokens (1024), temperature (0), top_p (1), maximum_image_edge (768) and jpeg_quality (85) for the optional first_frame/last_frame image inputs, timeout_seconds (120), and maximum_response_bytes (256KB).
Outputs: enhanced_prompt, integrated_multimodal_description, overall_soundscape, non_diegetic_music, and report_json.
Honest results, for once
The author's own testing is refreshingly un-sold: a CPU-only 8B passed a strict contract but changed "旋转" (rotate) to "站立" (stand) - and the node rejected that regression and kept the original text. Which is the point: contract validation checks structure, not semantic equivalence. A PASS on the contract is not a "this rewrite is good" certificate; you still eyeball the output. The README says it plainly - "词组PASS不等于通用语义等价" (phrase PASS ≠ general semantic equivalence).
Install
Part of the MiniMax H3 Audio T8 pack:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8
or search "MiniMax H3 Audio T8" in ComfyUI Manager and restart. No pip deps for local passthrough; the OpenAI/Ollama paths need those servers running locally and whatever key you point at via env var. Template: examples/workflows/14-prompt-relay/2026-08-23_H3_Prompt_Provider_Router_Advanced_EXP.json.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| provider_mode | COMBO | local_passthrough — 本地原文直通 | 3 options: local_passthrough — 本地原文直通, openai_compatible — OpenAI / LM Studio / llama.cpp, ollama_chat — Ollama本地或远程服务 |
| 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 | — |
| endpoint | STRING | Empty uses 127.0.0.1:1234 for OpenAI-compatible or 127.0.0.1:11434 for Ollama. Non-loopback endpoints require HTTPS and explicit permission. | |
| provider_model | STRING | local-model | — |
| api_key_env | STRING | Environment-variable name only; never paste the secret value here. | |
| confirm_provider_request | BOOLEAN | false | — |
| allow_remote_endpoint | BOOLEAN | false | — |
| max_new_tokens | INT | 10241–32768 | — |
| temperature | FLOAT | 0.000–2 | — |
| top_p | FLOAT | 1.000.01–1 | — |
| maximum_image_edge | INT | 768128–2048 | — |
| jpeg_quality | INT | 8530–95 | — |
| timeout_seconds | FLOAT | 120.001–600 | — |
| maximum_response_bytes | INT | 2621444096–4194304 | — |
| strict_output_contract | BOOLEAN | true | — |
| ollama_keep_alive | STRING | 0 | 0 asks Ollama to unload after the response; ignored by other providers. |
| contract_repair_attempts | INT | 00–2 | Optional deterministic repair requests after contract validation fails. Default 0 preserves old workflow request count; retries do not resend images. |
| 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 | — |