T8 Context IR Provider / 参考语义理解 (Advanced)
A reference-semantics node that defaults to fully offline
- reference_images
- context_ir
- context_ir_json
- report_json
Most "let an LLM look at your scene" nodes phone home by default and ask forgiveness later. MiniMaxH3ContextIRProviderT8Advanced does the opposite: its default mode, validate_local, doesn't touch the network at all. It validates a local Context IR - the structured intermediate representation of a scene that H3's studio workflows use - and only offers an external OpenAI-compatible visual analysis as an explicit opt-in that demands you confirm the upload first.
So what's a Context IR? Think of it as the "understanding" half of a prompt: instead of a raw text string, it's a structured JSON describing the scene, dialogue, cast and audio context that downstream nodes (like the Context IR Prompt Compiler) deterministically compile into actual H3 prompts. This node produces or validates that structure, optionally informed by reference images and transcripts. In validate_local mode it checks the JSON you paste in local_context_ir_json (there's a default placeholder) against your creative_brief and returns a validated context_ir.
The security posture matters
When you do opt into external analysis (provider_mode flips away from validate_local), read the constraints, because they're the good kind of paranoia:
- The API key comes only from an environment variable (
api_key_env, defaultOPENAI_API_KEY) - never from a widget you'd paste into a shared workflow. - Raw audio is never uploaded. Only a bounded set of
reference_images(up tomaximum_visual_frames8, downscaled tomaximum_image_edge768 atjpeg_quality85) is sent. confirm_external_uploadmust be explicitly true, andendpoint/provider_model(defaultgpt-4.1-mini) are right there if you'd rather point at a local LM Studio/llama.cpp/Ollama endpoint - the README's prompt-routing story is big on "local service = no key needed."timeout_seconds(120) andmaximum_response_bytes(262144) bound the call so a hung or huge response can't stall your queue.
This is the exact pattern the KB's external-API-node guidance pushes: a node that reaches the network and carries a credential should make that visible and reversible. This one does.
Wiring
Inputs: provider_mode, local_context_ir_json, creative_brief, plus optional exact_dialogue, audio_transcript and reference_images. Outputs: context_ir (custom H3_T8_CONTEXT_IR type), context_ir_json, and report_json. The context_ir output feeds directly into the Context IR Prompt Compiler, which turns the reviewed structure into a H3_T8_PROMPT_PACKET for sampling. Keep them paired: provider makes the understanding, compiler makes the contract.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8
Restart ComfyUI. No extra dependencies unless you're using the external provider, in which case you need an OpenAI-compatible endpoint and an env var, not a pip install. It lives in T8/MiniMax H3/Studio/Experimental, and the reference 11-studio-production workflows show the provider → compiler chain wired up. Start in validate_local mode - you can build a whole production pipeline without ever sending a frame anywhere.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| provider_mode | COMBO | validate_local | 2 options: validate_local, openai_compatible_visual |
| local_context_ir_json | STRING | {"context":{"scene":"describe the verified reference scene"}} | — |
| creative_brief | STRING | — | |
| endpoint | STRING | https://api.openai.com/v1/chat/completions | — |
| provider_model | STRING | gpt-4.1-mini | — |
| api_key_env | STRING | OPENAI_API_KEY | — |
| confirm_external_upload | BOOLEAN | false | — |
| maximum_visual_frames | INT | 81–32 | — |
| maximum_image_edge | INT | 768128–2048 | — |
| jpeg_quality | INT | 8530–95 | — |
| timeout_seconds | FLOAT | 120.001–600 | — |
| maximum_response_bytes | INT | 2621444096–4194304 | — |
| exact_dialogueopt | STRING | — | |
| audio_transcriptopt | STRING | — | |
| reference_imagesopt | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| context_ir | H3_T8_CONTEXT_IR | — |
| context_ir_json | STRING | — |
| report_json | STRING | — |