Nodes/Difforum/Difforum · Keyframe Images
ComfyUI Node

Difforum · Keyframe Images

Make the Clip Hit Your Pictures on the Beat

By chillithebillis·Created 4 months ago·Updated 11 days ago· 10
Difforum · Keyframe Images
  • images
  • direction
  • params
  • keyframes
  • indices
  • info
◄times►

Most AI video work is "here's a prompt, see what happens". This node is the opposite: it's for when you know exactly which picture has to be on screen at 4.0 seconds, and the render has to arrive there.

The pack calls it multikeyframing. You place markers on the Director's Keys track, feed a batch of images in the same order, and every renderer downstream honours them - the Feedback Sampler travels through the pictures, H3 and LTX Guides anchor them, the Animatic flashes them so you can check the timing before rendering. Built for installations and music pieces where an image has to land on a beat.

Inputs

  • images - one picture per key, in time order. Feed it a batch (Batch Images is the usual source). The tooltip's warning is the important part: these pictures set the look and the content the render passes through, so make them consistent. Same style, same resolution. A batch of mismatched references produces a clip that visibly lurches between aesthetics.
  • times - optional override. '0, 4s, 9.5s' or plain frame numbers. Leave it empty and the node uses the Director's Keys track; if there are no keys at all, it spreads your pictures evenly across the clip, which is a perfectly good first pass.
  • direction and params - the Director's wire (which carries the keys) and Setup.

Outputs

keyframes (the images, passed through in a form the bridges accept), indices (their frame numbers as a comma-separated string) and info.

The two outputs are a matched pair, and you'll usually wire both. keyframes + indices go into H3 Guides (which anchors up to max_guides of them inside the generation) or into Feedback Sampler's key_images / key_indices sockets, where key_pull and key_approach decide how hard and how early the travel aims at each picture. 0.65 pull with a 12-frame approach is a strong resemblance that arrives smoothly; pull 1.0 lands exactly on it.

If you're driving the sampler, remember the keys fight the energy curve. High energy with strong key pulls is a tug of war the key usually wins, but not cleanly - you get a smear that reads as a mistake. On a key-heavy clip, drop the energy a little around the key frames or lengthen the approach.

Install

Manager → search "Difforum", or:

cd ComfyUI/custom_nodes && git clone https://github.com/chillithebillis/Difforum.git difforum

Restart ComfyUI. numpy only; no models of its own.

Where people get burned

Order and count. The images must be in time order, and the count should match your markers. If you have five pictures and three keys, what happens next isn't a crash - it's a mismatch you'll notice as a picture arriving at the wrong moment, which is much harder to debug than an error. Set times explicitly on anything you care about rather than relying on the Keys track and hoping.

The second one is the batch itself. These keys are the strongest content signal in the whole graph, so a low-res or over-compressed reference becomes visible structure in the output, not just a colour note. And H3 and LTX will snap your indices onto their own grids, so a key you placed at frame 47 may effectively land at 46 or 48 - fine for feel, wrong if you're cutting to a musical grid measured in frames.

CategoryDifforum/2 · Direction

Inputs (4)

NameTypeDefaultDescription
imagesIMAGEOne picture per key, in time order (Batch Images). These pictures set the look and the content the render passes through, so make them good: same style, same resolution.
directionoptDIFFORUM_DIRECTIONThe Director's wire: camera, energy curve, scene prompts, keys and look in one cable.
paramsoptDIFFORUM_PARAMSFrom Setup: frame count, fps, width and height. Plug the same Setup everywhere.
timesoptSTRINGOverride the Director's Keys: '0, 4s, 9.5s' or frame numbers. Empty = use the Keys track; no keys = spread evenly.

Outputs (3)

NameTypeDescription
keyframesIMAGE—
indicesSTRING—
infoSTRING—