Qwen H3 Prompt (Local)
A MiniMax H3 prompt writer that runs entirely on your GPU — no Hub, no API key
- reference_images
- reference_videos
- h3_prompt
- selected_skill
- detected_mode
The short version
Qwen H3 Prompt (Local) is a node from chflame163 (the author of the popular dzNodes utility pack) that writes finished MiniMax H3 video prompts entirely on your own machine. You type a rough idea, it boots its own local llama.cpp server, loads a Qwen3.8-27B GGUF plus its vision projector, feeds the model the official MiniMax H3 skills as creative guidance, and hands you back one clean, schema-valid H3 prompt. No MiniMax Hub, no canvas, no approval cards, no API key, and no network traffic at inference.
Why bother? Because H3's prompt format is genuinely fiddly. Five input modes (T2VA, I2VA, L2VA, FL2VA, Ref2VA), every clip needs a duration plus overall_soundscape and non_diegetic_music blocks, and MiniMax's own skills assume you're working inside the Hub with its selection cards. This is the "local LLM as a node in the graph" pattern that made prompt-enhancer nodes a 2026 fixture, aimed squarely at H3. If you've stared at an empty prompt box wondering how to start a 10-second clip, this is the blank-page killer.
How it works
The node doesn't touch ComfyUI's model memory. It manages its own standalone, pinned llama.cpp llama-server - unloading your diffusion models while it runs and tearing it down after. Inside that server it does the whole pipeline:
- Mode routing. Zero reference media means T2VA, three-plus images or any reference video means Ref2VA - those are decided by counts alone. With one or two images the model itself reads your words and picks I2VA (image is a first frame), L2VA (last frame), FL2VA (both), or Ref2VA (pure reference). That's the subtle part: say what each picture is, or it can't route correctly.
- Skill routing. On
auto, the model makes a greedy, temperature-zero call to pick one of the nine bundled official skills (brand promo, music video, stop-motion explainer…) - or you pin one manually. - Validation and self-repair. The output is checked against the H3 format contract for the detected mode. If it fails - chat models love a preface or a clarifying question - the node runs an automatic repair pass against the exact list of problems, and raises instead of shipping garbage if it's still broken.
Inputs that matter
prompt- your plain-English idea. This is the whole job; it's what everything else routes on.skill-autoor one of the nine skills. Leave it on auto unless you know you want a specific style.duration- target clip length in seconds (default 10).think_mode/reasoning_effort- off uses Qwen's instruct sampling; on switches to thinking settings. Medium reasoning effort is the tuned RTX 3090 preset.reference_images(0–9) andreference_videos(0–3, IMAGE batches from e.g. VHS Load Video) -video_sample_frames_per_secsets how many frames per second go into a chronological contact sheet; 2 is fine for most shots, 3–8 for fast action.force_unload_model- default on: kills the llama-server and frees VRAM after every run. Off leaves a ~20 GB model resident for reuse.
Three outputs: h3_prompt (the final prompt - feed this to your H3 workflow), plus selected_skill and detected_mode to show what it chose.
Installing
Install via ComfyUI Manager (search "Qwen H3 Prompt") or:
cd ComfyUI/custom_nodes/
git clone https://github.com/chflame163/ComfyUI_Qwen_H3_Prompt.git
Then the part people miss: run the runtime installer before first use - the repo ships no llama.cpp, and install_runtime.py detects your OS, architecture and GPU to deploy the pinned b10436 runtime. On the Windows portable build:
cd ComfyUI\custom_nodes\ComfyUI_Qwen_H3_Prompt
..\..\..\python_embeded\python.exe install_runtime.py
Linux/macOS: python install_runtime.py (run --dry-run first to see the plan). It needs no pip dependencies.
Model files go in ComfyUI/models/LLM/Qwen3.8/:
mmproj-F16.gguf(vision projector, from unsloth/Qwen3.8-27B-GGUF)- a Qwen3.8-27B GGUF -
Qwen3.8-27B-Q4_K_M.gguffor 20 GB+ VRAM, or the ~12 GB abliterated build for 16 GB cards.
Where people get burned
- Linux NVIDIA users: the pinned llama.cpp release ships no prebuilt CUDA binary. You must build from source:
python install_runtime.py --backend cuda --build-from-source, and you'll need a workingnvidia-smi, CUDA toolkit withnvcc, and git/cmake/compiler. Vulkan is the automatic fallback. - One or two images, no clear role → the router guesses wrong. State "Picture 1 is the first frame" or "these are style references" in your prompt.
- Reference video size limits. Each video must be 2–15 seconds at 24 fps and total under 15 seconds, or it throws.
- Don't expect audio analysis. Qwen can't extract a reference track's BPM or melody - the soundscape fields are creative descriptions, not analysis. And this node writes text only: if you feed its output into local H3 weights and you're in the US/EU/UK/Korea, mind the H3 Community License's territory carve-out.
- Leave
force_unload_modeloff only when you're done tinkering - a resident ~20 GB model and a video sampler don't share a card politely.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Describe the video or production task. | — |
| skill | COMBO | auto | Auto routes the request, or choose one of the nine official MiniMax H3 Skills directly. |
| duration | FLOAT | 10.01–60 | Target H3 video duration in seconds. |
| llm_model | COMBO | Qwen3.8-27B-Q4_K_M.gguf | GGUF language model from ComfyUI/models/LLM/Qwen3.8. |
| vision_model | COMBO | mmproj-F16.gguf | GGUF multimodal projector from ComfyUI/models/LLM/Qwen3.8. |
| think_mode | BOOLEAN | false | Off uses Qwen's official instruct settings. On enables thinking and uses Qwen's official thinking settings. |
| reasoning_effort | COMBO | medium | Applied only in thinking mode. Medium is the balanced RTX 3090 preset. |
| seed | INT | 00–18446744073709550000 | ComfyUI seed. It is mapped deterministically to llama.cpp's 32-bit seed range. |
| max_tokens | INT | 8192256–8192 | Maximum generated tokens, including thinking when thinking mode is enabled. |
| video_sample_frames_per_sec | INT | 21–8 | Frames sampled from each second of every reference video. Frames from the same second are sent as one chronological contact sheet. |
| force_unload_model | BOOLEAN | true | On stops the node's llama.cpp server and clears its VRAM and system memory after each run. Errors always force an unload. |
| reference_imagesopt | COMFY_AUTOGROW_V3 | — | |
| reference_videosopt | COMFY_AUTOGROW_V3 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| h3_prompt | STRING | — |
| selected_skill | STRING | — |
| detected_mode | STRING | — |