MiniMax H3 Enhance Prompt
Let a local vision model write your MiniMax H3 prompt — and describe the exact images it will see
- images
- prompt
- ref_images
- duration_seconds
The blank-page problem is real with MiniMax H3. The Director wants a 350–500 word prompt in MiniMax's guide notation, and what you actually have is "a baker opening a bakery at dawn, a Samoyed walks in." MiniMax H3 Enhance Prompt is the shortcut: you give it reference images plus a one-line idea, it asks a local vision model to write MiniMax-shaped prose, and it hands the same images out on ref_images - so what the model described is literally what H3 conditions on. No cloud, no API key for the default path, nothing sent anywhere you don't point it.
How it works
It's a thin client for an OpenAI-compatible chat endpoint. The reference images get downscaled to max_image_size (768 on the long edge by default), JPEG-encoded, and sent alongside your idea. The model's answer is trimmed to max_words - the guide's 350–500 range - and cleaned of preamble so you don't get "Here is your enhanced prompt:" as literal prompt text. One non-negotiable: it has to be a vision model. A text-only model will ignore your images without saying so, and you'll get a generic prompt that has no idea what your reference looks like. qwen2.5vl:7b under Ollama is a reasonable starting point; larger VLMs write noticeably better prose.
The settings that matter
idea- what you want, in plain words. Everything else is scaffolding around it.preset-globalwrites scene, style, subjects and lighting and leaves the shots to your timeline.storyboardwrites the whole shot sequence with timestamps, which you should only use when your timeline segments carry no prompt text - otherwise the two shot numberings collide.provider/base_url/model- Ollama (defaulthttp://127.0.0.1:11434), LM Studio, or any OpenAI-compatible endpoint. Host and port only; no path.seed- ComfyUI caches node outputs, so an unchanged input means the model is never asked again. Bump it to force a fresh answer.unload_after- drops the vision model from VRAM when it's done, so it isn't resident while H3 samples. Leave it on; reloading costs seconds, an OOM costs the render.on_error-passthroughhands your raw idea on with a warning, so a stopped Ollama doesn't kill the whole run.api_key_env- for a hosted endpoint, this takes the name of an environment variable holding the key (MINIMAX_DIRECTOR_VLM_API_KEY, thenOPENAI_API_KEYfall back automatically). Never the key itself - widget values are saved inside the workflow, so a key typed here would travel with every copy you share.
What it outputs, and where it goes
Three outputs, all aimed at the Director:
prompt → Director.global_prompt
ref_images → Director.ref_images
duration_seconds → Director's `duration` socket (the connection-only one, in seconds)
duration_seconds is just the number you set passed through, so you only type it once and the model's timestamps match the Director's window.
Wiring and gotchas
The node deliberately does not write section labels, <Picture N> numbering, or shot markers. The Director compiles the structured prompt and assigns the reference ordinals itself - a second set from the model would nest structure inside structure and collide with the Director's numbering.
If the VLM and H3 share a GPU, the vision model is evicted after each run (that's unload_after). Ollama has no per-request device selection, so to run it on a second card you set CUDA_VISIBLE_DEVICES on the Ollama service, not here. Expect 15–45 s per run, during which the queue is blocked.
And set expectations honestly: a local enhancer removes the blank-page problem, it doesn't write the movie for you. Small vision models drift on multi-subject scenes (mixing up who's wearing what), so treat the output as a first draft you read before rendering - the same discipline the KB's LLM-in-ComfyUI essay hammers on for every local prompt enhancer.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| idea | STRING | What you want, in plain words. The vision model turns this plus the images into a MiniMax-shaped prompt. | |
| preset | COMBO | global (scene + style) | 'global' writes scene, style, subjects and lighting and leaves the shots to your timeline. 'storyboard' writes the whole shot sequence with timestamps — use it only when your timeline segments carry no prompt text, or the two shot numberings will collide. |
| imagesopt | COMFY_AUTOGROW_V3 | Up to 9 reference images. They are described by the vision model and passed straight through to ref_images. | |
| system_promptopt | STRING | Overrides the built-in instructions. Leave empty to use the preset's own, which is derived from MiniMax's prompt-writing guide. | |
| duration_secondsopt | FLOAT | 5.01–60 | Told to the model so its timestamps fit. Match the Director's duration. |
| provideropt | COMBO | ollama | Where the vision model runs. |
| base_urlopt | STRING | Empty = the provider's default (Ollama http://127.0.0.1:11434, LM Studio http://127.0.0.1:1234). http:// is added if you leave it off. No path — just host and port. | |
| modelopt | STRING | Model name. Must be a VISION model — a text-only model will ignore your images without saying so. Empty falls back to the provider default. | |
| seedopt | INT | 00–18446744073709550000 | ComfyUI caches node outputs, so an unchanged input means the model is never asked again. Change this to force a fresh answer. |
| max_image_sizeopt | INT | 768128–2048 | Long edge the images are downscaled to before they are sent. Larger costs time and buys little. |
| max_wordsopt | INT | 5000–2000 | Hard limit on the description. MiniMax's guide puts a detailed_description at 350-500 words; small models ignore that when asked politely, so the request is capped and the result trimmed to a sentence end. 0 disables both. |
| unload_afteropt | BOOLEAN | true | Drop the vision model from VRAM when done, so it is not still resident while H3 samples. Turn off only while iterating on prompts — reloading costs seconds, an OOM costs the render. Works with Ollama, and with llama-server in router mode. A plain llama-server or LM Studio cannot be told to let go over HTTP — give those an idle timeout of their own (llama.cpp: --sleep-idle-seconds N). |
| on_erroropt | COMBO | passthrough | 'passthrough' hands your raw idea on and warns, so a stopped Ollama does not kill the whole run. |
| api_key_envopt | STRING | Name of an ENVIRONMENT VARIABLE holding the API key for a cloud endpoint — not the key itself. Widget values are saved inside the workflow, so a key typed here would travel with every copy you share. Empty falls back to MINIMAX_DIRECTOR_VLM_API_KEY, then OPENAI_API_KEY. Local Ollama and LM Studio need none. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | Wire into the Director's global_prompt. |
| ref_images | IMAGE | The same images, batched. Wire into the Director's ref_images. |
| duration_seconds | FLOAT | The duration you set above, passed on so you only type it once. Wire into the Director's `duration` input (the connection-only one, in seconds). |