Nodes/kubakub nodes/kubakub keyframe clips
ComfyUI Node

kubakub keyframe clips

Animate two frames of the timeline with local MiniMax H3

By kubakubkub·Created about a month ago·Updated 2 days ago· 10
kubakub keyframe clips
  • model
  • clip
  • vae
  • audio_vae
  • frames
  • audio
  • model_ref
  • layer_images
  • enhance_clip
  • frames
  • prompts
  • audio
  • report
  • fps
◄fps25.00►
◄document►
◄steps0►
◄steps_ref0►
◄megapixels0.85►
◄seed42►
◄h3_audio0.60►
◄crossfade6►
◄enhancetrue►
◄scheduleauto►

What it's for

The director gives you a timeline of layers over a building. Some of it wants to be generated video - a window that becomes a window into something moving, a stretch of the sequence that needs real motion - but you don't want to animate the whole thing. You want two or three clips dropped into specific stretches, with sound, and everything else left exactly as composed.

kubakub keyframe clips (h3) does that with MiniMax H3, running locally. You set clips on the director's timeline; this node renders them, mixes H3's audio into the timeline's sound, and puts the frames back into the sequence.

Two clip flavours:

  • Keyframe clips use the fl2va model. The sequence frame at the clip's start becomes H3's first frame and the frame at its end becomes H3's last frame, and H3 animates the way between them. Because it's anchored at both ends, it joins the sequence without a seam.
  • Reference clips use the ref2va model. No anchors - references instead: director layers as image references, the music of that stretch as an audio reference, and/or the stretch itself as reference video with its sound. Joined with a short crossfade.

A licensing note that matters before you spend an evening downloading 33B of weights: H3's community licence excludes the US, EU, UK and South Korea from its applicable territory. That's a geofence, not a vibes-based restriction, and this node runs the local weights.

How it works

The chain follows ComfyUI core's own H3 templates (BasicGuider, res_multistep, simple). The engineering that makes it usable inside a timeline:

  • Clips are cached. Everything shaping a clip is the cache key, so changing one clip doesn't re-render the others, and an unchanged clip can skip the prompt enhancement too.
  • Enhanced prompts have their own cache. Changing steps, size or the LoRA renders again but doesn't re-run the enhancer.
  • Work runs in phases - enhance all, encode all, sample all per model, decode all - so each model loads once per run instead of once per clip.
  • Models are lazy. No clip to render (or the director is holding) means no H3 model loaded at all. Cache sizes are sized for a 12 GB card, which the pack says it tested on.

Inputs and outputs

Required: model (H3 fl2va - plus the 4-step flashgen LoRA, ideally), clip (the qwen3vl 32b H3 encoder, loaded via CLIPLoader with type minimax), vae (H3 video VAE), audio_vae (H3 audio VAE), frames (from director sequence), fps, document (the director's document output - that's where the timeline clips live), steps, steps_ref, megapixels, seed, h3_audio, crossfade.

The two step counts are not redundant: keyframe clips take 4 steps (that's the flashgen LoRA's regime), reference clips take 20 by default and 4 if you've got a turbo LoRA. megapixels (0.85) is H3's work size - it inherits the sequence's aspect and scales back up after. crossfade (6 frames) blends H3's output into the director's own frames at each clip end, because H3 doesn't reliably land exactly on the end frame; at most 12 frames are used regardless of what you type.

Optional: audio (the director's timeline sound, gets mixed with H3's), model_ref for reference clips, layer_images (whatever you wired into the director's layers, so references can point at those layers), and enhance_clip + enhance - a text encoder that can write (the Gemma 4 LTX encoder, CLIPLoader type ltxv) to expand each clip's prompt into H3's format, looking at the clip's first frame. That's the thing whose results get cached.

Outputs: frames (the sequence with clips in), prompts (what H3 actually received - copy one into a clip with raw on to tune it), audio (timeline sound + H3 sound), report (per clip: mode, time span, H3 size, frames, steps, time - or "from the cache"), and fps. Wire frames + fps + audio into Create Video, or into kubakub export video / frames.

Install

Manager → search kubakub nodes → install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/kubakubkub/ComfyUI_KubaNodes
python -m pip install -r ComfyUI_KubaNodes/requirements.txt

ComfyUI 0.37.0+ (H3 support in core needs a recent build), opencv-python-headless as the only added package, and ffmpeg via imageio-ffmpeg or PATH for the video work. Models are not the pack's job: H3 weights, the qwen3vl encoder and both VAEs come from the model list in the pack's docs/MODELS.md. Start in the director: compose, then add clips, then run this.

Common issues

  • Hours of rendering before the first frame appears. 33B of video model on a 12 GB card. The phases mean the model loads once, but it's still H3; keyframe clips (4 steps) are the cheap path, reference clips (20 steps) the expensive one.
  • A visible pop where the clip joins. H3 not landing exactly on the end frame is expected and why crossfade exists. Raising it helps up to a point; 12 frames is the cap.
  • The licence. Geofenced out of several regions. Read it before you build a commercial pipeline on it.
Categorykubakub/2d/motion

Inputs (19)

NameTypeDefaultDescription
modelMODELFor keyframe clips: H3 fl2va or any LTX 2.x, with or without a speed LoRA (FlashGen, TaoMate, distilled ...).
clipCLIPThe text encoder of the same model: Gemma for LTX (CLIPLoader type ltxv), Qwen3-VL for H3 (CLIPLoader type minimax).
vaeVAEThe video VAE of the same model (LTX or H3).
audio_vaeVAEThe audio VAE of the same model (its sound is mixed in).
framesIMAGEThe frames output of kubakub director sequence.
fpsFLOAT25.001–120The director's fps output.
documentSTRINGThe director's document output (its timeline clips).
stepsINT00–100Keyframe clips. 0 = what the model needs (its speed LoRA's steps, 20 without one); another number overrides it.
steps_refINT00–100Reference clips. 0 = what model_ref needs; another number overrides it.
megapixelsFLOAT0.850.1–2H3 work size (the aspect of the sequence); scaled to the sequence size after.
seedINT420–18446744073709550000Random seed for the clips (each clip adds its number to it); another seed gives other motion.
h3_audioFLOAT0.600–2Level of H3's own sound in the mix (0 = keep only the timeline sound).
crossfadeINT60–48Frames blended into the director's own frames at each clip end (H3 does not always land exactly on the end frame). At most 12 are used.
audiooptAUDIOThe director's audio output (timeline sound).
model_refoptMODELH3 ref2va for reference clips (+ a turbo LoRA -> fewer steps). An LTX model here makes first-frame clips (LTX has no references).
layer_imagesoptIMAGEThe images connected to the director's 'layers' input (for references to those layers).
enhance_clipoptCLIPA text encoder that can write (the Gemma 4 LTX encoder: CLIPLoader type ltxv) - it expands each clip's prompt into H3's format, looking at the clip's first frame.
enhanceoptBOOLEANtrueUse enhance_clip when connected.
scheduleoptCOMBOautoauto = from the model's file names (a 'distilled' / '4step' / 'flashgen' / 'taomate' name = fast, a 'dev' LTX or an H3 without a speed LoRA = full steps); the report says what it took. Set it when your files have other names.

Outputs (5)

NameTypeDescription
framesIMAGEThe sequence with the clips in.
promptsSTRINGThe prompts the model got, per clip (copy one into a clip with 'raw' on to tune it).
audioAUDIOTimeline sound + the model's sound.
reportSTRINGPer clip: mode, time span, size, frames, steps and time (or 'from the cache').
fpsFLOATThe frame rate (frames per second), passed through for Create Video.