MiniMax H3 OpenAI-Compatible Refiner
MiniMax H3 OpenAI-Compatible Refiner — polish prompts with any chat API, including a local one
- prompt
- package
- fl_constraint
- prompt
- text
The official Context IR refiner is great, but it's a paid API and it's the only refiner you get. This node is the escape hatch: it runs the same prompt-polishing job against any OpenAI-compatible chat API - your local vLLM, Ollama, a third-party hosted model, a DeepSeek-style reasoning model. Point it at an endpoint, name a model, and your H3 prompts get the same structured polish treatment, on your terms and at your cost. It's the local-first sibling of the official refiner, and for people who already run a local LLM it's the obvious choice.
How it works
Same flow as the Context IR refiner: take a prompt payload (plus optional reference media and FL constraint), send it to a chat endpoint with your instruction and music_style, get back a polished prompt, and repackage it as a MINIMAX_H3_PROMPT for Conditioning. It also has the built-in preview panel showing mode, frame count, duration, ratio, and the final text, and it polls for ComfyUI cancellation between requests.
Two things set it apart from the official node. First, the endpoint is yours: base_url defaults to http://127.0.0.1:8000/v1 - that's the default vLLM port, i.e. "a local vLLM on this machine." You point it at whatever serves an OpenAI-shaped API. Second, it can handle rolling keyframed segments: when fed an FL constraint with keyframes, it breaks the clip into segments and refines each one with its own start/end images and prompts - the multi-shot path the README's Storyboard → Refiner workflow is built around.
Auth follows the same good habit as the official node: the API key is read from an environment variable you name via api_key_env, never from the workflow JSON. Leave api_key_env empty for a no-auth local server.
The inputs that matter
base_url(required) - the endpoint, defaulthttp://127.0.0.1:8000/v1.model(required) - the model/deployment name the endpoint serves.instruction,music_style- same roles as the official refiner.api_key_env- name of the env var holding the key; empty = no auth.supports_image/supports_video/supports_audio- tell the refiner which reference modalities your endpoint can actually ingest. For a pure-text LLM, leave them off - the prompt still refines, the media just isn't part of the request.reasoning/reasoning_effort- DeepSeek thinking-mode controls;autoleaves the request unchanged.temperature(default 1),top_p(default 0.95),max_tokens(default 0 = no cap),extra_body_json(provider-specific body, e.g.{"enable_thinking": true}),timeout(default 120).prompt,package,fl_constraint- the optional inputs that define what gets refined.
Outputs: prompt and text, same as the official refiner. It's an output node for the preview panel.
Installing it
Pack-wide routine - ComfyUI Manager search "MiniMax H3", or:
cd ComfyUI/custom_nodes
git clone https://github.com/xiaolibai-sys/ComfyUI-MiniMaxH3
pip install -r requirements.txt
then restart. No model files - the model lives behind your endpoint. If you're self-hosting, spin up vLLM (or your server of choice) serving any good instruction-following LLM, then point base_url at it.
Common issues
- Connection refused. Nothing is listening on
127.0.0.1:8000. Start your vLLM/Ollama server first, then run the workflow. - Refiner returns the prompt unchanged. Either your endpoint returned a no-op, or the model name is wrong and you're hitting an error path. Check the model string against what your server actually serves.
- Media not in the request.
supports_image/supports_video/supports_audioare off, or your endpoint can't take them. For a text-only LLM, that's expected - describe the references in the prompt instead. - Auth fails.
api_key_envnames an env var that isn't set in ComfyUI's environment. Export it before launch - the key never belongs in the workflow.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| instruction | STRING | Make it more cinematic, detailed and temporally clear. | — |
| music_style | STRING | — | |
| base_url | STRING | http://127.0.0.1:8000/v1 | OpenAI-compatible endpoint, e.g. http://host:8000/v1 |
| model | STRING | Model or deployment name served by the endpoint. | |
| promptopt | MINIMAX_H3_PROMPT | — | |
| packageopt | PACKAGE_DATA | — | |
| fl_constraintopt | MINIMAX_H3_FL_CONSTRAINT | — | |
| api_key_envopt | STRING | Environment variable name holding the API key. Empty = no auth. | |
| supports_imageopt | BOOLEAN | false | — |
| supports_videoopt | BOOLEAN | false | — |
| supports_audioopt | BOOLEAN | false | — |
| reasoningopt | COMBO | auto | DeepSeek thinking mode. Auto leaves the request unchanged. |
| reasoning_effortopt | COMBO | auto | DeepSeek V4 reasoning effort. Auto omits it. |
| extra_body_jsonopt | STRING | Optional provider-specific JSON object merged into the request body, e.g. {"enable_thinking": true}. | |
| temperatureopt | FLOAT | 1.000–2 | — |
| top_popt | FLOAT | 0.950–1 | — |
| max_tokensopt | INT | 00–16384 | 0 = no token cap. Positive values cap output tokens. |
| timeoutopt | INT | 12010–3600 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | MINIMAX_H3_PROMPT | — |
| text | STRING | — |