DMXAPI MiniMax 影片生成
MiniMax H3 video in ComfyUI without the 33B download — and the setting that bites everyone
- first_frame
- last_frame
- VIDEO
- IMAGE_FRAMES
- LAST_FRAME
- VIDEO_PATH
- VIDEO_URL
- TASK_ID
MiniMax H3 is a 33B omni-modal model: text, image, video and audio as one input context, 4–15 second clips with native stereo audio, up to 2K. The weights are open - and the community licence excludes the EU, UK, South Korea and the US from running them, which MiniMax ties to its copyright litigation with the studios. There's also the small matter of a 33B video model on your GPU.
DMXAPI MiniMax 影片生成 is the other road: the hosted H3 API, resold by DMXAPI, no download and no licence question. You do not own the model. You pay per call and your prompt leaves the machine. In exchange, you can generate on a laptop.
What it does
One node covers all four H3 input shapes: text-only, first frame only, last frame only, and first-and-last frame. That last combination is the useful one - it's how you get controlled camera moves and cuts without fighting a prompt.
How it works
The node POSTs to /v1/responses with an input array: your prompt as a text item, then any frames as image_url items tagged with a role of first_frame or last_frame, base64 data URIs, JPEG-encoded. It submits with model: MiniMax-H3, gets back a task_id, then polls with model: MiniMax-H3-get until a video URL shows up. Then, by default, it downloads the file locally so the VIDEO output has something to hold.
Two source details. Every request carries aigc_watermark: false - China's AI-content watermark, switched off. And duration is a float in the UI while the upstream takes whole seconds, so it gets rounded: ask for 7.5, get 8.
The inputs that matter
resolution is 768P or 2K - a tier, not pixels. 2K is slower and pricier. ratio is 16:9, 9:16, 1:1, 4:3, 3:4 or 21:9, and it only does anything in text-to-video: the moment you connect a first_frame or last_frame, the upstream locks aspect to adaptive and follows your image, and the node stops sending the field at all. duration is 4–15 seconds, in half-second steps, rounded up or down before it's sent.
Then the three that actually cause support threads:
max_frames- the memory switch, and it has nothing to do with image quality.0(the default) decodes nothing;-1decodes the whole clip;Ndecodes N frames. ComfyUIIMAGEtensors are float32, so a single 4K frame is around 100 MB and a fifteen-second 24fps clip fully decoded is over 30 GB. Leave this at0unless you're actually post-processing frames.max_wait- the total polling budget, 900 seconds by default. This is the one. A 2K or long clip can genuinely take longer than 15 minutes, and when the clock runs out you get[DMXAPI Timeout]- which means the node gave up, not that the job stopped. The job is still running upstream, still billed, and because this pack has no fetch-later node,TASK_IDwon't get it back for you. Bump it to 1800–3600 before you render anything expensive.download_video- default on. Turn it off andVIDEOandVIDEO_PATHare empty, leaving youVIDEO_URLandTASK_IDonly. If you do that, you have to fetch the URL yourself before it expires. Given there's no second chance here, leave it on.
noise_seed deserves a warning: it's not reproducible. The author tested it - same prompt, same seed, prompt_optimizer off, two runs, two different videos. Its real job is to be the ComfyUI cache key, so changing it is what makes the node re-run. prompt_optimizer (on by default) has the upstream rewrite and expand your prompt first, which helps short prompts and interferes with long, precisely-written ones - turn it off when you've written the whole shot yourself.
Outputs, in order: VIDEO (wire to SaveVideo / PreviewVideo; the node shows an inline player when save_dir is empty), IMAGE_FRAMES, LAST_FRAME, VIDEO_PATH, VIDEO_URL, TASK_ID. LAST_FRAME is how you chain a second clip, and H3 won't hand you a last_frame_url - a real last frame only exists if max_frames was non-zero and frames actually decoded, so chaining two clips is reason enough to set -1.
Installing
Manager → search DMXAPI, or:
cd ComfyUI/custom_nodes
git clone https://github.com/mch000534/ComfyUI-DMXAPI
/path/to/ComfyUI/.venv/bin/python -m pip install -r ComfyUI-DMXAPI/requirements.txt
Restart. If you want frame decoding, make sure opencv-python or imageio is present; ffmpeg is a last-resort fallback for pulling a single first frame when both fail. Put your key in .env as MINIMAX_API_KEY or DMXAPI_KEY, or type it in the node's api_key field.
Where people get burned
Old workflows with width/height. Earlier versions of this node took pixel dimensions and converted them, and everything convertible - 1280x720, 1920x1080, 1344x768 - converted to the same 16:9 + 768P, which is why everyone got 1344x768 no matter what they typed. That's gone; it's resolution + ratio now. But ComfyUI saves widget values by position, so loading an old workflow drops those two back to defaults and can shift duration and noise_seed along with them. Check them, or delete the node and re-add it.
Polling failures aren't fatal - for a while. A single failed status check just logs a warning. Twenty in a row aborts the run (about 2.5 minutes at the default 8-second interval). 401 and 429 skip all of that and fail immediately, which is the right call: no amount of retrying fixes a bad key.
No player in the node. Keep download_video on and save_dir empty so the file lands in ComfyUI's output directory. The frontend can only serve files from output, input or temp; anywhere else and you get a path string and nothing to look at.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| resolution | COMBO | 768P | 上游解析度檔位;2K 較貴也較慢 |
| ratio | COMBO | 16:9 | 畫面比例。只在文生影片時生效;帶 first_frame / last_frame 時比例跟隨圖片 |
| duration | FLOAT | 5.04–15 | 影片長度(秒)。上游只收整數秒,會四捨五入。 |
| noise_seed | INT | 00–18446744073709550000 | 實測 H3 不保證可重現:同一組 prompt 與 seed 仍會得到不同影片。此欄位的實際用途是當成 ComfyUI 的快取鍵,改值才會重跑節點 |
| model | COMBO | MiniMax-H3 | 1 options: MiniMax-H3 |
| api_key | STRING | — | |
| prompt_optimizer | BOOLEAN | true | 開啟時上游會先改寫、擴寫 prompt 再生成(短 prompt 效果較好);關閉則嚴格照原文,適合已寫細的長 prompt 或要求結果可重現 |
| download_video | BOOLEAN | true | 關閉時只回傳 VIDEO_URL 與 TASK_ID,VIDEO 與 VIDEO_PATH 會是空的 |
| max_frames | INT | 0-1–4096 | -1 = 全部解碼;0 = 不解碼(只留 VIDEO 與影片預覽,最省記憶體);N = 最多 N 幀 |
| save_dir | STRING | — | |
| poll_interval | INT | 83–30 | — |
| max_wait | INT | 90060–3600 | — |
| first_frameopt | IMAGE | — | |
| last_frameopt | IMAGE | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| VIDEO | VIDEO | — |
| IMAGE_FRAMES | IMAGE | — |
| LAST_FRAME | IMAGE | — |
| VIDEO_PATH | STRING | — |
| VIDEO_URL | STRING | — |
| TASK_ID | STRING | — |