LlamaServe-Doc H3 Omni Generate
A local LLM writes your MiniMax-H3 prompt — no API, no key
- server_config
- ref_images
- ref_videos
- ref_video_audios
- ref_audios
- text
- performance_json
- groups
MiniMax-H3 - the 33B omni video model that went open-weights in August 2026 - is fussy about prompts. It wants a task block (T2AV, I2AV, L2AV, FL2AV or Ref2AV), <Picture N> / <Video N> / <Audio N> reference tags, and a fixed set of output sections in a strict order. Hand-writing that format is a chore you'll do wrong the first three times. This node is the shortcut: it runs a small Qwen GGUF on your own GPU, turns your one-line idea into a properly structured H3 prompt, and hands the result to the Director node so you can actually generate.
It's the flagship node of the LlamaServe-Doc pack, and it folds the pack's older Preset and Generate nodes into a single box. The name "LlamaServe" is a bit of a lie in the best way: nothing calls an API and there's no key. The pack launches its own native llama-server from llama.cpp and streams to it locally.
How it works
You need the pack's Loader first. It picks your GGUF from models/LLM, sets context length and GPU layers, and - on first run - downloads a prebuilt llama-server binary from the ggml-org/llama.cpp GitHub releases (SHA-256 verified, no pip dependencies anywhere). The Generate node takes the Loader's server_config output. Internally it builds the same system/user prompt pair the Preset node emits, validates your mode, duration, aspect ratio and media counts, converts any Comfy IMAGE/AUDIO to temp PNG/MP4/WAV inside a whitelisted temp directory, streams the request through llama-server's OpenAI-compatible endpoint, and cleans up after itself.
The mode decides everything about media:
- T2AV - pure text, no reference inputs.
- I2AV / L2AV - exactly one image, used as the exact first or last frame.
- FL2AV - exactly two images in order, first and last frame.
- Ref2AV - one or more mixed image/video/audio references, capped at 9 images, 3 videos, 3 audio files, 12 total. This is the strict one: your
raw_promptmust mention every label you connected and none you didn't, or the node errors out.
The inputs that matter
server_config and mode are the obvious ones. raw_prompt is where you type what you actually want - type @ and a menu of your connected media pops up, which saves you from hand-numbering <Picture 1> tags. duration is an integer 4–15 seconds and gets snapped to H3's legal 17*n+5 frame grid automatically; resolution for Ref2AV is locked to 16:9 or 9:16. The sampler row (temperature 0.2, top_k 20, top_p 0.9, min_p 0.05, repeat_penalty 1.05) has sane defaults - leave them alone. reasoning is off by default and should stay that way; a prompt rewriter wants small-and-obedient, not a model thinking out loud and leaking scratch-work into your prompt.
The reference inputs autogrow exactly like the official MiniMax H3 Reference to Video node: ref_image_0…8 (IMAGE), ref_video_0…2 (24 fps frame batches), ref_video_audio_0…2 (soundtrack paired to its video), ref_audio_0…2. An orphan ref_video_audio with no matching video just gets dropped.
Outputs
You get text (the enhanced prompt), performance_json (llama.cpp timings), and the one you actually care about: groups, type MMX_DIR_GROUP. It packs the enhanced prompt plus your references in the Director plugin's v1 structure. Wire it into MiniMaxH3Director's i2v_groups for T2AV/I2AV/L2AV/FL2AV, or r2v_groups for Ref2AV, and chain MiniMax H3 Director Groups Combine if you're building a multi-segment batch.
Install
ComfyUI Manager, search "LlamaServe-Doc", or:
cd ComfyUI/custom_nodes
git clone https://github.com/DocWorkBox/LlamaServe-Doc.git
Restart, then drop a GGUF into ComfyUI/models/LLM/. The demo workflow expects Qwen3.6-27B-H3-Prompt-Rewriter-Q4_K_M.gguf; for multimodal reference input grab Qwen2.5-Omni-7B plus its matching mmproj from the linked ModelScope repo. Video references need ffmpeg and ffprobe on your PATH.
Where people get burned
First run downloads llama-server from GitHub - needs network, and on Linux backend=auto compiles CUDA from source, so it wants nvcc, CMake and a C++ toolchain (it falls back to Vulkan/CPU cleanly if they're missing). VRAM tight? Lower gpu_layers before touching anything else; a 16 GB card runs the Qwen3.6-27B rewriter at context 4096, 47 layers, flash attention on, q8_0 KV cache. If you use comfyui_lg_hotreload, exclude ComfyUI-LlamaServer from hot reload or the dropdowns render as C / O / M / B / O. And remember the server sits resident by default - flip stop_server_after_generate or lean on the 5-minute idle timeout when you're done, or it'll hoard VRAM alongside H3.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| server_config | LLAMA_SERVER_CONFIG | — | |
| mode | COMBO | Ref2AV | 5 options: T2AV, I2AV, L2AV, FL2AV, Ref2AV |
| raw_prompt | STRING | — | |
| duration | INT | 54–15 | — |
| resolution | COMBO | 16:9 | 7 options: adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, +1 |
| max_tokens | INT | 20481–32768 | — |
| temperature | FLOAT | 0.200–2 | — |
| top_k | INT | 200–200 | — |
| top_p | FLOAT | 0.900–1 | — |
| min_p | FLOAT | 0.050–1 | — |
| repeat_penalty | FLOAT | 1.050–2 | — |
| seed | INT | 0-1–9223372036854776000 | — |
| reasoning | COMBO | off | 3 options: off, auto, on |
| stop_server_after_generate | BOOLEAN | false | — |
| idle_timeout_minutes | INT | 50–1440 | 0 disables automatic idle shutdown. |
| ref_imagesopt | COMFY_AUTOGROW_V3 | Reference images → <Picture N>. | |
| ref_videosopt | COMFY_AUTOGROW_V3 | Reference video frame batches at 24 fps → <Video N>. | |
| ref_video_audiosopt | COMFY_AUTOGROW_V3 | Soundtrack paired with the same-numbered ref_video_N. | |
| ref_audiosopt | COMFY_AUTOGROW_V3 | Standalone reference audio → <Audio N>. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| performance_json | STRING | — |
| groups | MMX_DIR_GROUP | — |