Nodes/MiniMax H3 Prompt Enhancer/MiniMax H3 GGUF Prompt Enhancer
ComfyUI Node

MiniMax H3 GGUF Prompt Enhancer

Your GPU, H3's prompt contract, zero API keys

By hyukudan·Created about a month ago·Updated 17 days ago· 15
MiniMax H3 GGUF Prompt Enhancer
    • enhanced_prompt
    • validation_report
    • enhancement_manifest
    • duration_seconds
    • aspect_ratio
    • treatment_warnings
    • width
    • height
    basic_prompt
    modeauto
    duration_seconds5.00
    reference_context
    llama_server_path
    gguf_model_path
    registered_model_dirs
    gpu_layersauto
    context_size32768
    threads0
    temperature0.20
    max_tokens8192
    request_timeout300
    startup_timeout180
    repair_attempts2
    disable_thinkingtrue
    creative_latitudeenhanced_production
    keep_server_loadedfalse
    ambience_foley_policyauto
    background_score_policyfollow_prompt
    instrumental_description
    voice_performanceaudible
    aspect_ratioauto
    media_manifest
    multishot_shot_count0
    frame_count0
    multishot_identity_lock
    multishot_voice_lock
    multishot_setting_lock
    show_advanced_controlsfalse
    creative_treatment_json
    shot_plan_json
    cinematography_json
    instrumental_stylenone
    acoustic_spacenone
    dialogue_coverageoff
    always_re_enhancefalse
    delivery_targetlocal
    dialogue_languageauto
    visual_style_presetnone
    target_megapixels0.00
    editing_intentnone
    lora_trigger_words

    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 - auto figures out whether this is t2va, ref2va, i2va, fl2va, l2va, or chained_multishot from your references and wording. Force it when auto guesses wrong.
    • gguf_model_path - pick the .gguf from the dropdown. It scans ComfyUI/models/llm_gguf/, your LM Studio cache, and anything in registered_model_dirs.
    • llama_server_path - path to an existing llama-server executable. 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_path explicitly or install llama.cpp.
    • Server won't start - check that context_size and gpu_layers fit 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_language defaulted to auto and 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.
    CategoryMiniMax H3/Prompting

    Inputs (43)

    NameTypeDefaultDescription
    basic_promptSTRING
    modeCOMBOauto7 options: auto, t2va, i2va, fl2va, l2va, ref2va, +1
    duration_secondsFLOAT5.004–1504-150 seconds. H3 was trained around 5-15 seconds; longer generations are experimental and require much more memory.
    reference_contextSTRINGOptional plain-language notes describing referenced pictures, videos, audio, identities, or roles. Usually needed only for Ref2VA.
    llama_server_pathSTRINGExisting llama-server executable; never downloaded automatically
    gguf_model_pathSTRINGExisting GGUF under a registered model directory
    registered_model_dirsSTRINGOptional additional roots separated by the OS path separator; ComfyUI and LM Studio model roots are automatic
    gpu_layersSTRINGautoauto, all, -1, or an exact layer count
    context_sizeINT327680–1310720 uses the safe 32768-token default
    threadsINT00–2560 uses llama-server's default
    temperatureFLOAT0.200–2
    max_tokensINT8192512–32768
    request_timeoutINT30010–1800
    startup_timeoutINT1800–18000 uses the safe 180-second default
    repair_attemptsINT20–4
    disable_thinkingBOOLEANtrue
    creative_latitudeCOMBOenhanced_productionHow 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_loadedBOOLEANfalse
    ambience_foley_policyoptCOMBOautoScene sounds other than speech or music: ambience plus physical action sounds such as footsteps, clothing, doors, impacts, and engines.
    background_score_policyoptCOMBOfollow_prompt3 options: follow_prompt, add_instrumental, off
    instrumental_descriptionoptSTRINGDescribe concrete instrumentation, tempo, rhythm, and dynamics; mood words are translated into audible parameters.
    voice_performanceoptCOMBOaudible3 options: audible, silent_mouth_acting_experimental, none
    aspect_ratiooptCOMBOauto7 options: auto, 21:9, 16:9, 4:3, 1:1, 3:4, +1
    media_manifestoptSTRINGAdvanced structured JSON for connected reference media.
    multishot_shot_countoptINT00–64
    frame_countoptINT00–3600Leave 0 to use Duration. A nonzero exact count must follow 17 × n + 5. Above about 362 frames (~15 s) is experimental.
    multishot_identity_lockoptSTRING
    multishot_voice_lockoptSTRING
    multishot_setting_lockoptSTRING
    show_advanced_controlsoptBOOLEANfalseShow structured reference metadata and exact frame controls
    creative_treatment_jsonoptSTRINGStable schema-v2 storage for genre, visual language, world aesthetic, and tone. Legacy v1 remains runtime-compatible; blank is neutral.
    shot_plan_jsonoptSTRINGOptional authoritative shot plan. Schema v1 remains compatible; v2 adds generations, presence, states, environments and start/path/end camera. Blank preserves automatic planning.
    cinematography_jsonoptSTRINGOptional schema-v2 manual color, camera, optics, focus, texture, and motion-rendering controls. Legacy v1 remains runtime-compatible; blank is neutral.
    instrumental_styleoptCOMBOnoneWhen instrumental score is enabled, adapt its arrangement to this musical language while preserving compatible user direction.
    acoustic_spaceoptCOMBOnoneDiegetic sound space for the permitted ambience, foley, and voices. It renders existing sounds; it never adds a source.
    dialogue_coverageoptCOMBOoffKeep every speaking character's mouth and eyes unobstructed, in focus, and framed at medium close-up or tighter for the whole line.
    always_re_enhanceoptBOOLEANfalseRe-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_targetoptCOMBOlocalAPI v2 makes the 7000-character text-block limit repairable and hard.
    dialogue_languageoptCOMBOautoTarget dialogue language. 'auto' automatically detects language from prompt context/dialogue.
    visual_style_presetoptCOMBOnoneQuick visual style preset. When selected, automatically applies this visual language unless overridden in creative treatment JSON.
    target_megapixelsoptFLOAT0.00Target 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_intentoptCOMBOnoneQuick 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_wordsoptSTRINGTrigger 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)

    NameTypeDescription
    enhanced_promptSTRING
    validation_reportSTRING
    enhancement_manifestSTRING
    duration_secondsFLOAT
    aspect_ratioSTRING
    treatment_warningsSTRING
    widthINT
    heightINT