Nodes/MiniMax H3/MiniMax H3 OpenAI-Compatible Refiner
ComfyUI Node

MiniMax H3 OpenAI-Compatible Refiner

MiniMax H3 OpenAI-Compatible Refiner — polish prompts with any chat API, including a local one

By xiaolibai-sys·Created about a month ago·Updated 29 days ago· 10
MiniMax H3 OpenAI-Compatible Refiner
  • prompt
  • package
  • fl_constraint
  • prompt
  • text
instructionMake it more cinematic, detailed and temporally clear.
music_style
base_urlhttp://127.0.0.1:8000/v1
model
api_key_env
supports_imagefalse
supports_videofalse
supports_audiofalse
reasoningauto
reasoning_effortauto
extra_body_json
temperature1.00
top_p0.95
max_tokens0
timeout120

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, default http://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; auto leaves 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_audio are 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_env names an env var that isn't set in ComfyUI's environment. Export it before launch - the key never belongs in the workflow.
CategoryMiniMax-H3/conditioning

Inputs (18)

NameTypeDefaultDescription
instructionSTRINGMake it more cinematic, detailed and temporally clear.
music_styleSTRING
base_urlSTRINGhttp://127.0.0.1:8000/v1OpenAI-compatible endpoint, e.g. http://host:8000/v1
modelSTRINGModel or deployment name served by the endpoint.
promptoptMINIMAX_H3_PROMPT
packageoptPACKAGE_DATA
fl_constraintoptMINIMAX_H3_FL_CONSTRAINT
api_key_envoptSTRINGEnvironment variable name holding the API key. Empty = no auth.
supports_imageoptBOOLEANfalse
supports_videooptBOOLEANfalse
supports_audiooptBOOLEANfalse
reasoningoptCOMBOautoDeepSeek thinking mode. Auto leaves the request unchanged.
reasoning_effortoptCOMBOautoDeepSeek V4 reasoning effort. Auto omits it.
extra_body_jsonoptSTRINGOptional provider-specific JSON object merged into the request body, e.g. {"enable_thinking": true}.
temperatureoptFLOAT1.000–2
top_poptFLOAT0.950–1
max_tokensoptINT00–163840 = no token cap. Positive values cap output tokens.
timeoutoptINT12010–3600

Outputs (2)

NameTypeDescription
promptMINIMAX_H3_PROMPT
textSTRING