APNext H3 Prompt Preview
Your MiniMax-H3 prompt is a wall of tagged text. This node makes it readable.
- text
MiniMax-H3 doesn't take a prompt, it takes a spec. The whole "LLM writes your video prompt for you" trend - which went from browser-tab trick to dedicated ComfyUI node packs over the last couple of years, per the KB - only helps if you can actually read what the LLM produced. An H3 prompt from the APNext H3 Prompt Writer is hundreds of words of <Subject N> tags, [Shot N] headers, (S1) speaker IDs, <d>[English] …</d> dialogue blocks and timestamps. Squinting at that in a plain text box is how you miss the line where the model made your subject's shadow move out of sync with their body.
H3PromptPreview is the display end of that pipeline, and it's about as honest a node as the pack ships: it color-codes the structure so you can verify the spec at a glance, gives you a one-click copy button for the final text, and does not touch a single character of it.
What it actually does
Feed it any H3 prompt - from the base writer, the reference writer, or any of the Claude Code writers in the same pack - and the node renders it with each structural element tinted:
<Subject N>,<Picture N>,<Video N>,<Audio N>tags get their own colors[Shot N]headers, speaker IDs like(S1), and<d>[Language]dialogue are highlighted separately- Section headers (
integrated_multimodal_description,overall_soundscape,non_diegetic_music, and the reference writer's six sections) are marked - Camera vocabulary, timestamps,
N/Aplaceholders and markers like<scenetrans>get their own treatment
That's all a client-side highlighter in web/js/h3_prompt_preview.js doing regex work. The Python side (class H3PromptPreview) is almost embarrassingly thin: it takes the string, returns it straight back out, and ships a copy to the UI. If you feed it a list instead of a string it joins them with blank lines first - handy if a writer ever hands you multiple candidates.
The inputs and outputs that matter
There's exactly one. text (multiline STRING) is the H3 prompt, and it's forceInput - you can't type into this node, you wire it. The single text output passes the prompt through untouched, so you can chain the preview in the middle of a workflow and still feed the clean text on to the MiniMax-H3 video node or a save node. That passthrough is the whole reason it's an output node worth keeping in the graph rather than a glorified comment.
Installing it
It's part of the comfyui_dagthomas pack, so you install the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas
pip install -r requirements.txt
Or search comfyui_dagthomas in ComfyUI Manager and hit Install. Either way, restart ComfyUI after. Note the pack's dependency pinning is deliberate: openai is capped below 3.0 because v3 broke the httpx.Client the API nodes pass, and Gemini uses google-genai rather than the legacy google-generativeai SDK - don't "fix" those in requirements.txt or you'll break the writers.
Gotchas worth knowing
The preview itself needs no API key and no models - it's pure display, and the JS ships inside the pack. But it's useless without something generating an H3 prompt, and that side of the pack needs a provider: a GEMINI_API_KEY / OPENAI_API_KEY / etc. env var, a local server (Ollama, LM Studio, vLLM), or a logged-in Claude Code CLI. Also remember the color is only decoration - if your final H3 prompt has stray <d> tags you actually want kept, this node won't save you from that; it just shows you clearly what's there. Which is, for a format this fiddly, most of the battle.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |