本地H3提示词@炮老师的小课堂
Write MiniMax H3 video prompts on your own GPU, no API key
- model
- reference_images
- reference_videos
- 🎬H3提示词
- 🧩选中Skill
- 🧭识别模式
What this node is for
MiniMax H3 doesn't want a sentence. It wants a document: a shot-by-shot integrated_multimodal_description: block with timestamps, an overall_soundscape: block, a non_diegetic_music: block, and named references to every image you feed it. Typing that by hand for a ten-second clip is a chore, and one wrong field name costs you a render to discover.
DapaoLocalH3Prompt (本地H3提示词@炮老师的小课堂) writes it with a local GGUF vision model - no online H3 node, no LLM API key, nothing leaving your machine. Rough idea plus reference frames in, finished H3-format prompt out.
It's a port of chflame163's ComfyUI_Qwen_H3_Prompt (MIT, credited in the pack), rerouted through this pack's own llama.cpp loader. Know before you invest: it's the newest thing in this repo - literally the HEAD commit - so it's less road-tested than the captioning nodes, everything is labelled in Chinese, and there's essentially no English discussion of it. You're early. (H3 itself is MiniMax's 33B omni-modal video model, and its licence geofences the local weights out of the US, EU, UK and Korea. This node is licence-neutral.)
How it works
Three inference calls, cheapest first.
Mode detection. H3's prompt shape changes with what you fed it (t2va, i2va, l2va, fl2va, ref2va). No assets → t2va, decided in code, no model call. More than two images, or any video → ref2va. One or two images and it depends on intent, so it asks the model a 32-token question - one image: i2va / l2va / ref2va; two: fl2va / ref2va - with thinking off and temperature 0, top_k 1.
Skill selection, only if 需求描述 is left on auto: another 96-token call picks one of nine bundled skills. h3-prompt-writing is the general one; the rest are production recipes (brand-promo-video-generator, music-video-subtitle-generator, and friends). Skills are prompt templates on disk - the node never executes anything inside them, and you can add your own.
The real call. Video inputs are IMAGE frame batches read at 24fps. Rather than dumping every frame at the model it builds per-second contact sheets - frames sampled at your rate, stitched into a grid - with a text block naming each cell's timestamp ("second 3/12 … read cells in row-major chronological order at 8.000s, 8.500s"). Images are attached whole and labelled by role: first frame, last frame, or general reference. Sampling is 0.7 with a presence penalty of 1.5, or 1.0/0.95 and no penalty with thinking on. Then a shape check; an empty reply gets one repair round-trip before failing with the fix - disable thinking, raise context and max tokens.
The inputs that matter
- 🤖本地模型 (
DAPAO_LOCAL_MODEL) - required, and it comes from this pack's loader, so 🤖大炮本地模型加载器 has to be in the graph too. Context length, GPU layers, KV cache and thinking all live there, not here. - ✏️需求描述 and 🧩Skill (
autoby default) - your brief, and whether the model picks the template or you do. - ⏱️目标秒数 (
duration, default 10, 1–60) - injected as "Target duration: X seconds". Match your real clip length. - 🎞️视频每秒采样帧数 (
video_sample_frames_per_sec, default 2, 1–8) - the quality/context dial. Each connected second of video becomes one contact sheet; raise it and you need more context. - 📝最大输出tokens (8192) - these prompts are long. Don't shave it. Plus 🎲随机种子 and 🧹完成后卸载模型 (on by default).
- 🖼️参考图 (up to 9) and 🎞️参考视频帧 (up to 3). Each image slot takes exactly one image - a batch errors out and says so. Video slots want a frame batch from a loader set to 24fps.
The line beginners trip on: connect any image or video and you must pick a matching mmproj on the loader, or the node refuses to run. Text-only prompts can run without one.
Outputs
Three STRINGs. 🎬H3提示词 is the payload - wire it wherever your H3 prompt goes today. 🧩选中Skill and 🧭识别模式 are audit outputs; when a render comes out wrong, check the mode first, because a mis-detected i2va vs ref2va changes everything downstream while the prompt still looks plausible.
Install
ComfyUI Manager → search llama-cpp-dapao / ComfyUI-llama_Dapao. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/paolaoshi/ComfyUI-llama_Dapao
python -m pip install -r ComfyUI-llama_Dapao/requirements.txt
The dependency list is where the time goes. It pins llama-cpp-python to a JamePeng fork commit, because PyPI stops at 0.3.35 and that build can't load Qwen3.8 GGUFs with MTP/NextN layers - you get missing tensor 'blk.64.ssm_conv1d.weight'. The git install builds a CPU backend, which is slow and wants a compiler. On NVIDIA, install the requirements, then force-reinstall the matching CUDA wheel from JamePeng's releases over it; the same advice shows up in community threads about Qwen-VL nodes, so it's the standard fix, not a pack quirk. Restart, then drop your GGUF main model and mmproj into ComfyUI/models/LLM/.
Where it breaks
Empty or chatty replies. The node's fallback message is the fix list: thinking off in the loader, more context, more max tokens. Small models like to answer you conversationally instead of writing the document.
mmproj mismatch. If the vision handler won't load, the main model and the projection aren't a pair. The loader also filters models/LLM for .gguf files with mmproj in the filename, so don't "tidy up" the name into something that loses that word.
VRAM. You're holding a VLM and a video model on one card. 🧹完成后卸载模型 defaults to on for exactly that reason - turning it off speeds up the next run and makes the next render likelier to OOM.
Output that drifts off-format. Long multi-asset runs can push past the loader's context. Bump it to 32768 before you blame the model.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | DAPAO_LOCAL_MODEL | — | |
| prompt | STRING | — | |
| skill | COMBO | auto | 10 options: auto, 3d-animation-short-generator, brand-promo-video-generator, co-op-game-intro-generator, h3-prompt-writing, handdrawn-live-video-generator, +4 |
| duration | FLOAT | 10.01–60 | — |
| seed | INT | 00–18446744073709550000 | — |
| max_tokens | INT | 8192256–32768 | — |
| video_sample_frames_per_sec | INT | 21–8 | — |
| force_unload_model | BOOLEAN | true | — |
| reference_imagesopt | COMFY_AUTOGROW_V3 | — | |
| reference_videosopt | COMFY_AUTOGROW_V3 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 🎬H3提示词 | STRING | — |
| 🧩选中Skill | STRING | — |
| 🧭识别模式 | STRING | — |