MiniMax H3 GGUF Prompt Enhancer
Your GPU, H3's prompt contract, zero API keys
- enhanced_prompt
- validation_report
- enhancement_manifest
- duration_seconds
- aspect_ratio
- treatment_warnings
- width
- height
MiniMax H3 is genuinely good at following what you write - the community reaction when it dropped was "it followed the prompt perfectly." The catch is that "what you write" means its strict sectioned contract, not whatever sentence you typed into a text box. Simple prose gets you audio desync and dialogue in the wrong language. This node is the local, offline answer: it runs a GGUF text model through a private llama-server and returns an H3-compliant prompt plus calibrated width/height - no API key, no cloud, nothing downloaded behind your back.
What this node actually is
Don't be confused by the name: the GGUF here is not H3. H3 is the 33B audiovisual diffusion model that renders video. This node is a separate, much smaller text model - an instruct-tuned chat LLM in GGUF form, like Qwen or Llama - whose whole job is rewriting your rough idea into H3's documented structure (the three-block T2VA contract, or the six-block Ref2VA anatomy when you're feeding references). Think of it as the LLM-as-a-tool pattern from llm-in-comfyui.md: a tool you bolted onto the workflow, built around one specific model's prompt spec.
What makes it different from most local-LLM enhancers is the backend. Instead of loading llama-cpp-python inside ComfyUI's process, it spawns a standalone llama-server binary bound to 127.0.0.1 on a random port with a random API key. That buys crash isolation (a native llama.cpp segfault can't take ComfyUI down), no Python wheel conflicts, and deterministic VRAM reclaim - kill the process and 100% of that VRAM is free before H3 starts sampling.
The inputs that matter
You mostly set four things:
basic_prompt- your rough idea. Be sloppy here; it's the point.mode-autofigures out whether this ist2va,ref2va,i2va,fl2va,l2va, orchained_multishotfrom your references and wording. Force it whenautoguesses wrong.gguf_model_path- pick the.gguffrom the dropdown. It scansComfyUI/models/llm_gguf/, your LM Studio cache, and anything inregistered_model_dirs.llama_server_path- path to an existingllama-serverexecutable. The tooltip is blunt: never downloaded automatically. If it's on your PATH it's found for you.
creative_latitude is the one worth understanding before you crank it. It's a four-step dial for how far the writer may go beyond your words: verbatim_source reformats only; conservative_grounded adds the minimum the mode needs; enhanced_production (the default) resolves unspecified composition, blocking, lighting, micro-performance; invented_production treats your text as a premise and builds the world around it. Quoted dialogue, reference identities, duration, shot count and gore level stay locked at every level.
gpu_layers (auto/all/-1/exact), context_size (default 32768), threads, temperature (0.2), max_tokens (8192) are the llama-server knobs - leave them alone until something's slow or OOMs. repair_attempts (default 2) lets the LLM re-run when validation fails. The big one: keep_server_loaded defaults to false, meaning the server starts, does its job, and dies - freeing VRAM instantly. Set it true only if you're re-running constantly and have headroom, and keep the MiniMaxH3UnloadGGUFServer node handy for when you want it gone.
The outputs
The headliner is enhanced_prompt - wire it into your H3 conditioning. Then width and height, already aligned to 16-pixel steps for your chosen aspect_ratio and target_megapixels, so they feed the empty-latent and sampler nodes directly (1280×720 for 16:9 at auto). validation_report says what was wrong before the repair loop fixed it; enhancement_manifest is the JSON audit trail, and duration_seconds, aspect_ratio, treatment_warnings round out what you'd pass downstream.
Install and first run
Same pack as everything here: ComfyUI Manager (search ComfyUI-MiniMax-H3-Prompt-Enhancer) or:
cd ComfyUI/custom_nodes
git clone https://github.com/hyukudan/ComfyUI-MiniMax-H3-Prompt-Enhancer.git
Then restart ComfyUI. The pack itself is dependency-free - pure Python, GPL-3.0, Python 3.10+. What you do need to supply: a llama-server binary (grab it from a llama.cpp release) and a chat GGUF in ComfyUI/models/llm_gguf/. Nothing here downloads models for you - both the security upside and the one extra step.
Where people get burned
- "(llama-server not found)" in the dropdown - the binary isn't on PATH or in a ComfyUI-managed runtime dir. Set
llama_server_pathexplicitly or install llama.cpp. - Server won't start - check that
context_sizeandgpu_layersfit your hardware. A 131072-token context on an 8GB card is a no-go; drop the context and offload less. - Dialogue came out in English when you wrote Spanish -
dialogue_languagedefaulted toautoand the detector misread the source. Set it explicitly. - A one-off legal note if you're in the US/EU/UK/Korea: H3's own weights are geofenced out of your region by the MiniMax community license. That's about H3, not this node - but it's why some run the enhancer locally and still hit the model via API.
Inputs (43)
| Name | Type | Default | Description |
|---|---|---|---|
| basic_prompt | STRING | — | |
| mode | COMBO | auto | 7 options: auto, t2va, i2va, fl2va, l2va, ref2va, +1 |
| duration_seconds | FLOAT | 5.004–150 | 4-150 seconds. H3 was trained around 5-15 seconds; longer generations are experimental and require much more memory. |
| reference_context | STRING | Optional plain-language notes describing referenced pictures, videos, audio, identities, or roles. Usually needed only for Ref2VA. | |
| llama_server_path | STRING | Existing llama-server executable; never downloaded automatically | |
| gguf_model_path | STRING | Existing GGUF under a registered model directory | |
| registered_model_dirs | STRING | Optional additional roots separated by the OS path separator; ComfyUI and LM Studio model roots are automatic | |
| gpu_layers | STRING | auto | auto, all, -1, or an exact layer count |
| context_size | INT | 327680–131072 | 0 uses the safe 32768-token default |
| threads | INT | 00–256 | 0 uses llama-server's default |
| temperature | FLOAT | 0.200–2 | — |
| max_tokens | INT | 8192512–32768 | — |
| request_timeout | INT | 30010–1800 | — |
| startup_timeout | INT | 1800–1800 | 0 uses the safe 180-second default |
| repair_attempts | INT | 20–4 | — |
| disable_thinking | BOOLEAN | true | — |
| creative_latitude | COMBO | enhanced_production | How far beyond your text the writer may go. verbatim_source: none - keep your wording, facts and terseness as written; only reformat into H3 sections, apply the selected style and translate delivery marks. conservative_grounded: only the minimum structure the H3 mode requires. enhanced_production: resolve unspecified production decisions - composition, blocking, lighting, micro-performance. invented_production: treat your text as a premise and build the world around it. Quoted dialogue, reference identities, duration, shot count, ending and gore level stay locked at every level. |
| keep_server_loaded | BOOLEAN | false | — |
| ambience_foley_policyopt | COMBO | auto | Scene sounds other than speech or music: ambience plus physical action sounds such as footsteps, clothing, doors, impacts, and engines. |
| background_score_policyopt | COMBO | follow_prompt | 3 options: follow_prompt, add_instrumental, off |
| instrumental_descriptionopt | STRING | Describe concrete instrumentation, tempo, rhythm, and dynamics; mood words are translated into audible parameters. | |
| voice_performanceopt | COMBO | audible | 3 options: audible, silent_mouth_acting_experimental, none |
| aspect_ratioopt | COMBO | auto | 7 options: auto, 21:9, 16:9, 4:3, 1:1, 3:4, +1 |
| media_manifestopt | STRING | Advanced structured JSON for connected reference media. | |
| multishot_shot_countopt | INT | 00–64 | — |
| frame_countopt | INT | 00–3600 | Leave 0 to use Duration. A nonzero exact count must follow 17 × n + 5. Above about 362 frames (~15 s) is experimental. |
| multishot_identity_lockopt | STRING | — | |
| multishot_voice_lockopt | STRING | — | |
| multishot_setting_lockopt | STRING | — | |
| show_advanced_controlsopt | BOOLEAN | false | Show structured reference metadata and exact frame controls |
| creative_treatment_jsonopt | STRING | Stable schema-v2 storage for genre, visual language, world aesthetic, and tone. Legacy v1 remains runtime-compatible; blank is neutral. | |
| shot_plan_jsonopt | STRING | Optional authoritative shot plan. Schema v1 remains compatible; v2 adds generations, presence, states, environments and start/path/end camera. Blank preserves automatic planning. | |
| cinematography_jsonopt | STRING | Optional schema-v2 manual color, camera, optics, focus, texture, and motion-rendering controls. Legacy v1 remains runtime-compatible; blank is neutral. | |
| instrumental_styleopt | COMBO | none | When instrumental score is enabled, adapt its arrangement to this musical language while preserving compatible user direction. |
| acoustic_spaceopt | COMBO | none | Diegetic sound space for the permitted ambience, foley, and voices. It renders existing sounds; it never adds a source. |
| dialogue_coverageopt | COMBO | off | Keep every speaking character's mouth and eyes unobstructed, in focus, and framed at medium close-up or tighter for the whole line. |
| always_re_enhanceopt | BOOLEAN | false | Re-run the LLM on every queue even when the inputs are unchanged. Disabled reuses the cached enhancement, so requeueing an unchanged prompt no longer forces the H3 sampler to regenerate the video. |
| delivery_targetopt | COMBO | local | API v2 makes the 7000-character text-block limit repairable and hard. |
| dialogue_languageopt | COMBO | auto | Target dialogue language. 'auto' automatically detects language from prompt context/dialogue. |
| visual_style_presetopt | COMBO | none | Quick visual style preset. When selected, automatically applies this visual language unless overridden in creative treatment JSON. |
| target_megapixelsopt | FLOAT | 0.00 | Target resolution in Megapixels (MP), e.g. 0.2, 0.3, 0.5, 0.92 (720p), 2.0 (1080p). Leave 0.0 for standard defaults; Custom accepts any positive finite value. |
| editing_intentopt | COMBO | none | Quick video editing intent preset for Ref2VA (Character Swap, Wardrobe Transfer, Voice/Dialogue Swap, Background Change, Motion Transfer, Custom Editing). Automatically enforces video editing summary and retention policies. |
| lora_trigger_wordsopt | STRING | Trigger tokens for the LoRAs loaded elsewhere in the graph. Appended verbatim to the end of the description after enhancement and validation, so they never pass through the LLM and survive character for character. |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| enhanced_prompt | STRING | — |
| validation_report | STRING | — |
| enhancement_manifest | STRING | — |
| duration_seconds | FLOAT | — |
| aspect_ratio | STRING | — |
| treatment_warnings | STRING | — |
| width | INT | — |
| height | INT | — |