MiniMax-H3 Prompt Writer (T2VA/I2VA/FL2VA/L2VA)
MiniMax-H3 prompt writing for people who can't run a 27B
- duration
- aspect_ratio
- options
- rewritten_prompt
- integrated_multimodal_description
- overall_soundscape
- non_diegetic_music
Here's the honest trade this pack makes you choose between: the 27B rewriter gets the format from a trained LoRA, and it costs ~16 GB of VRAM plus a big download. This node gets it from MiniMax's own prompt-writing guide - the same document their documentation points at - dropped into the system prompt of an ordinary instruction-following GGUF. No LoRA, no 27B, no 52 GB anything.
The result: a 2.6 GB Qwen3.5-4B fills all three H3 fields in about 20 seconds on an 8 GB card. That's the whole pitch. The trade is real and worth stating plainly - the LoRA is the format, a 27B trained until H3 output came out of it, so its prose is denser and its formatting more reliable. Here, ~4,000 tokens of instructions have to hold the format together, and a small model obeys instructions less strictly than a trained distribution reproduces itself. Expect this to run at all on hardware the LoRA cannot touch.
How it works
The guide is fetched from MiniMaxAI/MiniMax-H3 on first use (~16 KB) and cached in ComfyUI/user/minimax_h3_rewriter/guides/. It lands in the system prompt, your prompt becomes the user turn, and the model writes in the guide's shape. Outputs are identical in name and order to the 27B rewriter's - rewritten_prompt, integrated_multimodal_description, overall_soundscape, non_diegetic_music - so the two are drop-in interchangeable in a saved workflow. Nothing here has to be Qwen, and nothing has to be installed: without llama-cpp-python the node runs the official llama.cpp binaries.
The inputs that matter
prompt- the short idea.model- any GGUF with a chat template. Suggested starting points: Qwen3.5-4B on an 8 GB card, Qwen3.5-9B for the best writing per gigabyte, the abliterated 9B "Uncensored" build if the stock model declines a scene, or Gemma 3 12B / Mistral Small 24B when you have the VRAM.task-T2VA,I2VA,FL2VAorL2VA. Everything but T2VA also emits the alignment instruction line H3 requires as the very first line, with the duration already substituted to two decimals.reference_material- this node reads text, not pixels. For I2VA, FL2VA and L2VA you must describe what the reference frames show - by hand, or from a MiniMax-H3 Reference Caption node upstream. Without it the model invents a first frame that has nothing to do with your image. This is the trap in this node.greedy- keep on. Small models drift out of the format the moment they sample.duration- 4–15 s; the slider drives shot count and pacing. Keep it equal to your H3 settings.
n_ctx is handled for you: the base guide needs ~9,200 tokens of context and the full-reference guide ~12,300, against an 8192 default that suits the LoRA's shorter system prompt - so the node raises it automatically rather than letting llama.cpp truncate the front of the prompt (the guide and the output contract), which would silently break the format.
Install
Standard pack install - ComfyUI Manager (search "MiniMax-H3"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/MiniMax-H3-Prompt-Rewriter-ComfyUI
The writer nodes run the llama.cpp binaries, so the Python requirements are only needed for the Transformers-based rewriter nodes. First run fetches the guide and your chosen model.
Where people get burned
- Missing field. If a section comes back empty the node still returns everything it got and names the absent field on the node itself. Fix: lower the temperature, or move up a size. A 4B holds the format; a 9B holds it and writes better prose.
- Wrong first frame. You picked I2VA but didn't describe the frame in
reference_material. It's text-only here - the model cannot see your image, so describe or caption it first. - Format wobble. It's instructions being followed, not a trained distribution. Keep
greedyon and skim the output before it goes into H3. That's the price of running on hardware the LoRA can't touch - and for most people it's a very good price.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | The short prompt to expand into an H3 audio-video description. | |
| model | COMBO | Any GGUF language model. Entries prefixed 'on disk:' are already in your ComfyUI model folders and 'ollama:' ones are models you pulled for Ollama; the rest are fetched on first use. Nothing has to be installed: without llama-cpp-python the node runs the official llama.cpp binaries. | |
| task | COMBO | T2VA | T2VA: text only. I2VA: the reference image is the first frame. FL2VA: first and last frame. L2VA: the reference image is the last frame. Everything but T2VA also writes the alignment instruction line, with the duration already filled in. |
| resolution | COMBO | 16:9 | Target 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. |
| duration | FLOAT,INT | 100.1–600 | Target 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. |
| greedy | BOOLEAN | true | Deterministic decoding. Worth keeping on for small models, which drift out of the format when they sample. |
| seed | INT | 420–4294967295 | — |
| keep_model_loaded | BOOLEAN | false | Keep the writer in VRAM after the rewrite. Leave off when the same GPU has to run MiniMax-H3 video generation afterwards — or send it to a second card with 'device' in the options node. |
| aspect_ratioopt | STRING,COMBO | Optional, 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. | |
| reference_materialopt | STRING | This node reads text, not pixels. For I2VA, FL2VA and L2VA, describe what the reference frames show — by hand, or from a captioner node — so the rewrite is anchored to them. Describe what the reference frames show, one per line: Picture 1: ... | |
| optionsopt | H3_REWRITER_OPTIONS | — | |
| bypassopt | BOOLEAN | false | Hand '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_promptopt | STRING | Replace 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_lastopt | BOOLEAN | false | Hand 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_pickopt | STRING | Which 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 (4)
| Name | Type | Description |
|---|---|---|
| rewritten_prompt | STRING | — |
| integrated_multimodal_description | STRING | — |
| overall_soundscape | STRING | — |
| non_diegetic_music | STRING | — |