Nodes/ComfyUI-MiniMax-H3-Guide/MiniMax H3 Structured Prompt Enhancer (Plan v2)
ComfyUI Node

MiniMax H3 Structured Prompt Enhancer (Plan v2)

Let Qwen add production detail without touching your structure

By ethanfel·Created 22 days ago·Updated 14 days ago· 207
MiniMax H3 Structured Prompt Enhancer (Plan v2)
  • clip
  • plan_context
  • clip_tail
  • enhanced_prompt
  • editable_prose
  • enhanced_plan_context
  • base_system_prompt
  • effective_system_prompt
  • llm_prompt
  • enhancer_report
system_promptYou are a descriptive-prose editor for a compiled MiniMax H3 audiovisual plan. You do not write an H3 prompt. You return only the JSON object requested by the user message. Improve clarity, chronology, physical observability, composition, lighting, motion, camera language, ambience, and synchronized action sounds while preserving the user's intent. Enhancement standard: - Follow the authoritative enhancement-mode contract appended to this prompt. It determines whether strings are addenda or complete rewrites. - Add only grounded production detail: concrete blocking, spatial relationships, observable motion, continuity from opening state to ending state, and relevant synchronized physical sounds. - Do not create new story facts such as characters, props, locations, actions, state changes, dialogue, lyrics, visible text, or independent audio sources. A visible attribute may be added only when supported by the supplied prose or visual evidence assigned to that exact role. - Prefer information density over padding, repetition, ornamental adjectives, generic cinematic atmosphere, or restating the global premise. Rules: - Never introduce, remove, rename, renumber, paraphrase, move, or reinterpret a reference label such as <Subject 1>, <Picture 1>, <Video 1>, or <Audio 1>. An existing label may repeat naturally inside the same editable field. - Never write H3 section names, [Shot N] markers, cut timestamps, H3 dialogue-tag markup, speaker IDs, task types, retention markers, or native routes. Python reconstructs them from locked data. - Preserve the original creative emphasis and intensity as well as every requested identity, object, action, state change, relationship, setting, visible text, dialogue intent, and negative constraint. Never euphemize, sanitize, soften, intensify, moralize, or otherwise reinterpret it. - Describe only observable audiovisual facts. Do not add motivation, judgment, emotional interpretation, or phrases such as an intimate atmosphere unless the source explicitly requests them. - Treat attached visual media only as supplementary evidence for the exact declared image/video role. Textual scene intent is authoritative; pixels may clarify assigned identity or appearance but never override the requested action, emphasis, framing, or tone. Never infer audio, speech, music, or personality from pixels. - Audio meaning comes only from supplied metadata and transcripts. Never claim to have listened to audio. - Keep exact reference labels present in the same shot prose where they currently occur. They may be woven into a clearer sentence, but may not be removed or moved to another shot. - Return valid UTF-8 JSON with double-quoted keys and strings. Do not use Markdown fences, comments, trailing commas, explanations, or additional keys.
visual_analysisText metadata only (no visual analysis)
analysis_long_edge512
video_analysis_fps1.0
max_analysis_frames8
max_new_tokens1200
samplingsample
temperature0.65
top_k64
top_p0.95
min_p0.05
repetition_penalty1.02
presence_penalty0.00
seed0
thinkingfalse
offload_after_generationfalse
enhancement_modeIntent-locked expansion

Writing a good H3 prompt is two different jobs. One is structural - correct labels, valid timing, references routed properly - and the compiler already does that. The other is descriptive: taking a bare scene and adding concrete blocking, lighting, motion, and synchronized sound so the model has something rich to work with. Structured Prompt Enhancer (Plan v2) is the node that delegates the second job to a Qwen LLM while keeping the first locked down hard.

The cleverness is in the lock. Qwen gets your compiled plan and returns JSON prose - but it never writes an H3 prompt. The system prompt is explicit: no section names, no [Shot N] markers, no cut timestamps, no dialogue-tag markup, no speaker IDs. Python validates the JSON, reconstructs the full H3 document, and restores every structural field itself. If Qwen tries to renumber your Subjects or move your references, the change is rejected, not silently accepted.

The two modes

  • Intent-locked expansion (default) - your original prose stays verbatim; Qwen appends only compatible production detail. This is the safe one.
  • Creative expansion - Qwen may rewrite the editable prose and add presentation choices. References, timing, dialogue, shot order, and routes stay locked either way.

Inputs that matter

  • clip - a complete generation-capable Qwen3-VL or Qwen3.5 CLIP, or MiniMax H3's 50-layer conditioning CLIP with the Generation Tail Loader connected. This is an LLM-capable ComfyUI CLIP, not an OpenAI vision CLIP.
  • plan_context - from Prompt Merge.
  • system_prompt - editable prose behavior; blank uses the built-in production-detail pass.
  • visual_analysis - off by default (text metadata only), and the tooltip calls it "safest and lowest-memory." When on, it attaches sampled image/video frames as evidence. Note the sharp rule: audio is never inferred from waveform data; audio meaning comes only from your Audio Reference metadata and transcripts.
  • max_new_tokens, temperature, top_k, top_p, min_p, repetition_penalty, presence_penalty, seed - the standard sampler set. max_new_tokens (default 1200) is the one to raise for many long shots.
  • thinking - off is recommended for direct schema-following output.

Outputs

The ones that matter: enhanced_prompt (the rebuilt, validated final prompt), editable_prose (validated JSON for Apply Structured Prose), enhanced_plan_context (recompiled locked plan matching the enhanced prompt), and enhancer_report (mode, generation, visual-analysis, fallback, and validation status).

Install and prerequisites

cd ComfyUI/custom_nodes
git clone https://github.com/ethanfel/ComfyUI-MiniMax-H3-Guide

The pack itself is dependency-free, but this node is the exception to the "nothing to download" rule: it needs a real Qwen3-VL/Qwen3.5 CLIP, or the MiniMax H3 conditioning CLIP plus the generation tail file (see the Generation Tail Loader article). Both are model downloads, not pack dependencies.

Gotchas

  • Fallback is not failure. If Qwen returns empty, repetitive, or invalid output, the node falls back to the deterministic compiler draft and tells you in enhancer_report. Your prompt doesn't vanish - you just get the un-enhanced version.
  • No invented story facts. The system prompt forbids adding characters, props, locations, dialogue, or lyrics not in the supplied prose. If your shots are vague, the enhancement is thin; feed it real material.
  • Keep clip and tail consistent. Complete Qwen3-VL doesn't need the tail; the truncated 50-layer conditioning CLIP does. Mixing them up either wastes the tail or errors.

One honest take: if your shots are already detailed, you can skip this node entirely and go Prompt Merge → Apply Reference Plan. The enhancer pays off when you're drafting thin and want production-grade prose without hand-writing it. That's the audience it's built for.

CategoryMiniMax H3/Plan v2

Inputs (20)

NameTypeDefaultDescription
clipCLIPA complete generation-capable Qwen3-VL or Qwen3.5 CLIP, or MiniMax H3's conditioning CLIP with Generation Tail Loader connected.
plan_contextMINIMAX_H3_PLAN_V2Connect compiled plan_context from MiniMax H3 Prompt Merge (Plan v2).
system_promptSTRINGYou are a descriptive-prose editor for a compiled MiniMax H3 audiovisual plan. You do not write an H3 prompt. You return only the JSON object requested by the user message. Improve clarity, chronology, physical observability, composition, lighting, motion, camera language, ambience, and synchronized action sounds while preserving the user's intent. Enhancement standard: - Follow the authoritative enhancement-mode contract appended to this prompt. It determines whether strings are addenda or complete rewrites. - Add only grounded production detail: concrete blocking, spatial relationships, observable motion, continuity from opening state to ending state, and relevant synchronized physical sounds. - Do not create new story facts such as characters, props, locations, actions, state changes, dialogue, lyrics, visible text, or independent audio sources. A visible attribute may be added only when supported by the supplied prose or visual evidence assigned to that exact role. - Prefer information density over padding, repetition, ornamental adjectives, generic cinematic atmosphere, or restating the global premise. Rules: - Never introduce, remove, rename, renumber, paraphrase, move, or reinterpret a reference label such as <Subject 1>, <Picture 1>, <Video 1>, or <Audio 1>. An existing label may repeat naturally inside the same editable field. - Never write H3 section names, [Shot N] markers, cut timestamps, H3 dialogue-tag markup, speaker IDs, task types, retention markers, or native routes. Python reconstructs them from locked data. - Preserve the original creative emphasis and intensity as well as every requested identity, object, action, state change, relationship, setting, visible text, dialogue intent, and negative constraint. Never euphemize, sanitize, soften, intensify, moralize, or otherwise reinterpret it. - Describe only observable audiovisual facts. Do not add motivation, judgment, emotional interpretation, or phrases such as an intimate atmosphere unless the source explicitly requests them. - Treat attached visual media only as supplementary evidence for the exact declared image/video role. Textual scene intent is authoritative; pixels may clarify assigned identity or appearance but never override the requested action, emphasis, framing, or tone. Never infer audio, speech, music, or personality from pixels. - Audio meaning comes only from supplied metadata and transcripts. Never claim to have listened to audio. - Keep exact reference labels present in the same shot prose where they currently occur. They may be woven into a clearer sentence, but may not be removed or moved to another shot. - Return valid UTF-8 JSON with double-quoted keys and strings. Do not use Markdown fences, comments, trailing commas, explanations, or additional keys.Editable prose behavior. Blank uses the built-in production-detail pass. The node appends a non-editable schema contract and exposes both versions.
visual_analysisCOMBOText metadata only (no visual analysis)Disabled is safest and lowest-memory. Enabled attaches image pixels and sampled video frames. Audio is never inferred from waveform data.
analysis_long_edgeINT512256–1536Maximum long edge for Qwen visual evidence; hidden when analysis is disabled.
video_analysis_fpsFLOAT1.00.1–2Generic-Qwen video sampling rate; hidden when analysis is disabled.
max_analysis_framesINT82–32Generic-Qwen frame cap per video; hidden when analysis is disabled.
max_new_tokensINT1200128–4096Maximum generated JSON tokens. Increase for many long Shots.
samplingCOMBOsample2 options: deterministic, sample
temperatureFLOAT0.650.01–2
top_kINT640–1000
top_pFLOAT0.950–1
min_pFLOAT0.050–1
repetition_penaltyFLOAT1.020–5
presence_penaltyFLOAT0.000–5
seedINT00–18446744073709550000
thinkingBOOLEANfalseOff is recommended for direct schema-following output.
clip_tailoptMINIMAX_H3_GENERATION_TAILConnect Generation Tail Loader only for MiniMax's truncated 50-layer conditioning CLIP. The tail is always temporary.
offload_after_generationoptBOOLEANfalseCompatibility switch retained for existing workflows. The enhancer never explicitly unloads a connected CLIP because a synchronous unload can stall large complete Qwen models; ComfyUI manages its residency instead. If an old workflow enables this switch, the request is safely ignored. The temporary H3 generation tail is always unloaded internally.
enhancement_modeoptCOMBOIntent-locked expansionIntent-locked expansion (recommended) preserves your original prose verbatim and lets Qwen append only compatible production detail. Creative expansion lets Qwen rewrite the editable prose while Python still locks references, timing, dialogue, roles, and routes.

Outputs (7)

NameTypeDescription
enhanced_promptSTRINGFinal prompt rebuilt and validated by Python. Intent-locked mode preserves the source wording and appends only accepted details.
editable_proseSTRINGComplete validated prose JSON after the selected mode is applied. Connect it to Apply Structured Prose for manual refinement.
enhanced_plan_contextMINIMAX_H3_PLAN_V2Recompiled locked plan matching enhanced_prompt.
base_system_promptSTRINGEditable system instructions exactly as resolved from the widget.
effective_system_promptSTRINGActual system instructions sent to Qwen: base prompt plus the selected mode and non-editable schema contract.
llm_promptSTRINGComplete Qwen chat template for debugging or use in another compatible LLM node.
enhancer_reportSTRINGSelected-mode, generation, visual-analysis, fallback, validation, tail, and CLIP-residency safety status.