Nodes/MiniMax-H3-Prompt-Rewriter-ComfyUI/MiniMax-H3 Prompt Writer (Ref2VA)
ComfyUI Node

MiniMax-H3 Prompt Writer (Ref2VA)

Full-reference MiniMax-H3 prompts, six sections at a time

By pytraveler·Created about a month ago·Updated a day ago· 170
MiniMax-H3 Prompt Writer (Ref2VA)
  • duration
  • aspect_ratio
  • options
  • rewritten_prompt
  • subject_definitions
  • summary
  • retention_analysis
  • detailed_description
  • overall_soundscape
  • non_diegetic_music
prompt
reference_assets
model
resolution16:9
greedytrue
seed42
keep_model_loadedfalse
bypassfalse
system_prompt
repeat_lastfalse
library_pick

The ordinary writer turns text into a video description. Ref2VA is the full-reference mode from MiniMax's own guide: the target video doesn't just depict a scene, it reuses assets - a character's look, a specific style, a voice timbre, a clip being edited. MiniMax's full-reference guide knows how to express that, and this node turns your prompt plus a list of labeled references into the six-section description H3 wants.

This is the sibling of the MiniMax-H3 Prompt Writer (T2VA/I2VA/FL2VA/L2VA) - same no-LoRA approach, any instruction-following GGUF, the guide fetched from MiniMax on first use. The difference is which guide goes into the system prompt (the longer, ~24 KB full-reference one) and what comes out: six named outputs instead of three.

The one input that's the whole point

reference_assets is required, and the node refuses to run when it's empty - full-reference mode describes how a target video reuses assets, so with no assets it's just T2VA under another name. One asset per line, labeled, and the model does the rest:

Picture 1: young woman, long dark hair, blue cardigan, thin silver necklace
Picture 2: corner cafe interior, brick wall, brass lamps, rain on the window
Audio 1: voice-timbre reference for the woman - low, unhurried, slight rasp

The model binds <Subject 1> to the woman, <Picture 1> to the drawing's style, picks the [task type] prefix itself, and writes the retention analysis - fully_preserved, partially_preserved, attribute_transfer, weak_reference, fully_copy, that vocabulary. Or skip the typing: run a MiniMax-H3 Reference Caption (or the Multi Reference Caption) upstream and paste its reference_assets output straight into this field.

The outputs

  • subject_definitions - what each <Subject N> / <Picture N> / <Video N> / <Audio N> label denotes.
  • summary - the [task type] prefix and the reference relationships in one paragraph.
  • retention_analysis - per label: how faithfully each asset is carried over.
  • detailed_description - the body, shot by shot, labels cited where their roles apply.
  • overall_soundscape - ambience and physical sound.
  • non_diegetic_music - the audience-only score.

Plus rewritten_prompt, the whole thing in one string. Every output is a plain STRING - wire any of them into a text viewer.

Inputs to know

  • prompt - what the target video should show and how it uses the references. The descriptions in reference_assets say what the assets are; this says what they're for.
  • model - the guide is the longer of the two, so a 4B will hold the format, but a 9B keeps the labels consistent across all six sections. That consistency is where small models wobble.
  • resolution / duration - keep equal to what you pass to H3. Duration caps at 15 s here.
  • greedy - on. Small models drift out of format when they sample.

Install

Same pack, same two commands as every node in it:

cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI

(Or ComfyUI Manager → search "MiniMax-H3".) The writer runs the official llama.cpp binaries, so no Python deps are strictly needed for this node - first run fetches the guide and your model.

Where people get burned

  • Empty reference_assets gets refused, not silently downgraded to T2VA. That's deliberate and it's the right call - but it means wiring a captioner upstream is the normal setup, not an optional extra.
  • Labels stay within their own category. Picture 1, Picture 2, Video 1, Audio 1 - not 1 through 4. The caption nodes already number this way, so pasting their output just works.
  • The rewrite may invent retention levels. It's following instructions, not reproducing a trained distribution. Skim the retention_analysis before generating - if a character's look must survive unchanged, that's the line to eyeball.
CategoryMiniMax-H3

Inputs (14)

NameTypeDefaultDescription
promptSTRINGWhat the target video should show, and how it uses the references.
reference_assetsSTRINGRequired. One asset per line — the node reads text, not pixels, so this is all the model knows about them. Label them Picture N, Video N or Audio N and say what each one is for. List every reference asset, one per line: Picture 1: young woman, long dark hair, blue cardigan, seated by a window Video 1: source clip being edited — handheld walk down a night street Audio 1: voice-timbre reference for the woman
modelCOMBOAny GGUF language model. The full-reference guide is the longer of the two, so a 4B will hold the format but a 9B keeps the labels consistent across all six sections.
resolutionCOMBO16:9Target aspect ratio the rewrite is composed for. It has no socket on purpose: a ratio arriving from the graph belongs on 'aspect_ratio', which reads the spellings other nodes use and overrides this while it is connected.
durationFLOAT,INT100.1–600Target clip length in seconds; drives shot count and pacing. Right-click the node for 'duration': the default value back, or a new upper end for the widget. It offers 30 seconds until you change it and the server takes up to 600, because a widget's range is fixed when the node is declared and one number cannot suit every graph -- MiniMax's own guide is written around clips of a few seconds, while the stretched pipelines the community has built run well past that. What you set is remembered with the workflow.
greedyBOOLEANtrueDeterministic decoding. Keep it on unless the result is too plain.
seedINT420–4294967295
keep_model_loadedBOOLEANfalseKeep the writer in VRAM after the rewrite.
aspect_ratiooptSTRING,COMBOOptional, and it overrides the picker while something is connected. Reads a ratio ('16:9'), a frame size ('3840x1080') or a bare number ('1.78'), and a label around the pair is fine -- '3:4 (Portrait Standard)' reads as 3:4. A size within 2% of a listed ratio is called by its name, so 1376x768 arrives as 16:9 rather than as 43:24.
optionsoptH3_REWRITER_OPTIONS
bypassoptBOOLEANfalseHand 'prompt' straight to the output and run no model at all: nothing is downloaded, nothing is loaded, no VRAM is touched. This is what ComfyUI's own bypass (Ctrl+B) cannot do here - it only forwards a connected link, and every input this node writes from is a widget, so bypassing the node the usual way leaves the nodes downstream with nothing. The section outputs come back empty.
system_promptoptSTRINGReplace the whole assembled guide with your own system prompt, and the guide is not even fetched. This is what aims these nodes at something other than MiniMax-H3: the H3 format lives in that text and nowhere else, so a guide written for LTX, Krea or Wan makes this a writer for those. 'MiniMax-H3 Guide Prompt (any LLM)' hands you the stock one on its 'system_prompt' output - the shortest way in is to take it, edit it and connect it back here. Left empty, nothing changes. The task message is never replaced: it carries the prompt, the aspect ratio and the duration, which any guide needs. One consequence to expect. This node splits the answer into the H3 sections, so a guide that replies with a paragraph fills 'rewritten_prompt' and leaves the section outputs empty. That is worth knowing rather than worth avoiding.
repeat_lastoptBOOLEANfalseHand back a prompt this node already has instead of running the model again. By default that is the node's own last answer: with nothing kept yet it runs once, keeps what it wrote and says so, and from then on returns that same text for as long as the switch is on, whatever else you change. Pick something in the library window and this switch hands that saved prompt on instead -- the window chooses which prompt, this switch is what makes it happen. Off is always a real run. The session store is in memory only, one answer per node: it is not saved with the workflow and does not survive a restart, while a saved prompt does both. 'bypass' still wins over all of it.
library_pickoptSTRINGWhich saved prompt this node hands on instead of writing one, as JSON written by the library window. It is a widget so the choice is saved with the workflow and reaches an API run: a pick the graph does not carry is a graph that reproduces something else. It applies only while 'repeat_last' is on. That switch is what hands a kept prompt on at all; this says which one, and empty means the node's own last answer.

Outputs (7)

NameTypeDescription
rewritten_promptSTRING
subject_definitionsSTRING
summarySTRING
retention_analysisSTRING
detailed_descriptionSTRING
overall_soundscapeSTRING
non_diegetic_musicSTRING