ComfyUI Node

AD_MinMax_FL2

H3 image-to-video with real keyframes

By cardenluo·Created 2 years ago·Updated a day ago· 320
AD_MinMax_FL2
  • context
  • model
  • media
  • media_1
  • media_2
  • media_3
  • media_4
  • media_5
  • media_6
  • media_7
  • media_8
  • media_9
  • media_10
  • media_11
  • media_12
  • media_13
  • media_14
  • media_15
  • media_16
  • context
  • video
  • text
prompt
width1344
height768
length124
single_image_positionauto
seed0
fps24
media_type_1
media_type_2
media_type_3
media_type_4
media_type_5
media_type_6
media_type_7
media_type_8
media_type_9
media_type_10
media_type_11
media_type_12
media_type_13
media_type_14
media_type_15
media_type_16

Two images in, one video out, and the first image becomes the opening frame while the second becomes the closing frame - everything between them is generated. That's AD_MinMax_FL2, the pack's take on first/last-frame image-to-video for MiniMax's H3 video model. If you've ever wanted a clip that starts on one shot and ends on a completely different one (a scene transition, an object moving from A to B, a character turning around), this is the node that gives you both ends as hard constraints instead of hoping the model lands there.

The "FL2" is the clue: First/Last 2. Unlike the AD_MinMax_Ref2 node, which uses images/videos/audio as references for identity and style, this one treats your images as literal keyframes pinned to the timeline. It's a different job and it's worth knowing which you want before you pick.

How it works

You hand it a RUN_CONTEXT (the pack's bundle carrying model/clip/vae/audio_vae down one wire - that's its whole "Loader → Controller → Sampler" design), a prompt, and up to two ordered images. It resizes each image to your generation resolution, VAE-encodes it, and attaches it to the H3 conditioning as minimax_keyframes - one anchored at frame 0, one at the last frame. The sampler then fills the space between with the prompt.

The length input is where beginners get surprised: it's the frame count at 24fps, and it auto-snaps to the 17k+5 grid the H3 architecture wants (124 frames ≈ 5 seconds). Set 100 and you'll get 99. Don't fight it - that's the model's token structure.

single_image_position ("auto" default, "first", "last") decides where a lone image goes. Auto is the smart one: if there's a context latent being carried forward (i.e. you're continuing a previous clip), a single image becomes the last frame of the continuation; otherwise it becomes the first frame. That default does the right thing in both common setups, so you mostly leave it alone.

Inputs that matter

  • context (RUN_CONTEXT) - required; carries clip, VAE and audio VAE. It errors loudly if any are missing.
  • prompt (STRING) - the motion/scene description. Keep it about what happens between the keyframes.
  • width/height (INT, defaults 1344×768, step 32) - generation resolution.
  • seed - standard; it has control_after_generate wired in.
  • media / media_1..16 - image or latent only. This is the key difference from Ref2: no audio, no video references here. At most 2 images and 1 context latent, and the node throws a clear error if you exceed that.

Outputs: context (the updated bus, including the sampled latent you can chain into the next shot), video, and text (the resolved prompt).

Known quirks

Because it uses the MiniMax H3 machinery (comfy_extras.nodes_minimax_h3), it hard-fails on ComfyUI builds without native H3 support. And note the reference-count discipline: AD_MinMax_FL2 accepts at most two images because that's the model's keyframe limit - don't try to sneak a third reference image in.

Installing it

It ships in cardenluo/ComfyUI-Apt_Preset. ComfyUI Manager → search "Apt_Preset" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
pip install -r requirements.txt   # or double-click install.bat on Windows

Restart, then make sure your ComfyUI is recent enough for native MiniMax H3 support and that you have an H3 model loaded through the pack's universal loader (the README's Sum_load_adv handles model combos). The heavy optional extras in the pack README (GGUF, Advanced-ControlNet, nunchaku, the Apt_File segmentation resources) aren't needed for this node.

CategoryApt_Preset/AD

Inputs (42)

NameTypeDefaultDescription
contextRUN_CONTEXT
promptSTRING
widthINT134432–4096
heightINT76832–4096
lengthINT1245–3600
single_image_positionCOMBOauto3 options: auto, first, last
seedINT00–18446744073709550000
modeloptMODEL
fpsoptFLOAT241–120
mediaoptIMAGE,LATENT,STRING
media_1optIMAGE,LATENT
media_type_1optSTRING
media_2optIMAGE,LATENT
media_type_2optSTRING
media_3optIMAGE,LATENT
media_type_3optSTRING
media_4optIMAGE,LATENT
media_type_4optSTRING
media_5optIMAGE,LATENT
media_type_5optSTRING
media_6optIMAGE,LATENT
media_type_6optSTRING
media_7optIMAGE,LATENT
media_type_7optSTRING
media_8optIMAGE,LATENT
media_type_8optSTRING
media_9optIMAGE,LATENT
media_type_9optSTRING
media_10optIMAGE,LATENT
media_type_10optSTRING
media_11optIMAGE,LATENT
media_type_11optSTRING
media_12optIMAGE,LATENT
media_type_12optSTRING
media_13optIMAGE,LATENT
media_type_13optSTRING
media_14optIMAGE,LATENT
media_type_14optSTRING
media_15optIMAGE,LATENT
media_type_15optSTRING
media_16optIMAGE,LATENT
media_type_16optSTRING

Outputs (3)

NameTypeDescription
contextRUN_CONTEXT
videoVIDEO
textSTRING