Nodes/MiniMax H3 Direct/MiniMax H3 First-Last-Frame to Video
ComfyUI Node

MiniMax H3 First-Last-Frame to Video

Give it a first frame, an optional last frame, and watch the motion fill in between

By meta-sota·Created about a month ago·Updated about a month ago· 33
MiniMax H3 First-Last-Frame to Video
  • key
  • first_frame
  • last_frame
  • VIDEO
prompt
resolution768P
duration5
seed42
watermarkfalse

Plain text-to-video gives you a clip that starts wherever the model felt like starting. MiniMax H3 First-Last-Frame to Video pins down both ends: you hand it a first frame, optionally a last frame, and H3 invents the motion in between. If you've ever burned ten generations trying to get a text-to-video clip to end somewhere specific - a character closing a door, a loop that lands on the frame it started from - this is the node for that job. It's the classic image-to-video pattern, with the last frame as the lever that makes endings controllable instead of accidental.

How it works

The node is the API client from this pack with an upload step bolted on. Unlike the URL variants, this one takes actual IMAGE tensors from your graph - anything upstream that outputs images works: a LoadImage, a KSampler result, an img2img pass. On execute it encodes each frame, uploads it to <base_url>/v1/files/upload, and gets back an mm_file://{file_id} reference the API can use without you hosting anything. The first frame goes in with role first_frame; if you provided one, the last frame rides along as last_frame. Then it's the same task-and-poll dance as the rest of the pack - POST to /v2/video_generation, poll every 10 seconds, download the finished VIDEO.

Two details worth knowing from the source. First, there's no ratio input on this node - the aspect ratio of the output follows your frames, so whatever shape your image is, that's the shape of the clip. Feed it a square image, get a square video. Second, the node validates frames before sending them: images need to be at least 256×256 and within a roughly 2:5 to 5:2 aspect range. Take that as the API's floor, not a recommendation - you want clean, decent-resolution frames, because they become the literal first and last frames of the output.

The inputs that matter

  • first_frame - required IMAGE. The opening shot. Everything downstream is this image in motion.
  • last_frame - optional IMAGE. The ending. Omitting it gives you plain first-frame-to-video; including it is what locks the finale.
  • prompt - text description of the motion you want between the two frames. This is where you direct the action: "she turns toward the window," "the cup falls and shatters," "the camera slowly pushes in."
  • resolution - 768P or 2K for the output.
  • duration - 4–15 seconds. Longer durations give the model more room but cost more per second.

Seed and watermark behave the same as the rest of the pack: the watermark toggle requests an AIGC watermark, and the seed input is accepted but never sent to the API - it does nothing. Same for every node in this pack, so stop worrying about it.

Install

Same as the pack's other nodes. Manager → Install via Git URL → https://github.com/meta-sota/ComfyUI-MiniMaxH3-API.git, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/meta-sota/ComfyUI-MiniMaxH3-API.git
cd ComfyUI-MiniMaxH3-API
pip install -r requirements.txt

Only aiohttp from pip; the real prerequisite is a recent ComfyUI with the native V3 node API (author tests 0.30.0). No model downloads, no GPU needed. Connect a MiniMax H3 API Key node to key and you're off.

Common issues

  • "MiniMax H3 token is required." - the Key node isn't connected or its token is empty.
  • "prompt is required" - you can't generate from images alone; a non-empty prompt is mandatory even when both frames are set.
  • Upload rejected - usually an image below the 256×256 floor or an extreme aspect ratio. Preprocess the frame (resize, crop, aspect-correct) before it hits this node.
  • Interrupted runs - the node checks for your Cancel signal between polls and raises a clean error instead of silently continuing.
CategoryMiniMaxH3/Direct

Inputs (8)

NameTypeDefaultDescription
keyMINIMAX_H3_KEY
promptSTRINGText description of the video.
first_frameIMAGEFirst frame image.
resolutionCOMBO768POutput resolution.
durationINT54–15Duration in seconds (4-15).
seedINT420–4294967295Random seed.
watermarkBOOLEANfalseAdd an AIGC watermark to the video.
last_frameoptIMAGEOptional last frame image.

Outputs (1)

NameTypeDescription
VIDEOVIDEO