First and last frame

A clip that starts at one picture and ends at another, with the motion in between invented by the model.

In plain words

In image to video the model knows only where the clip begins. With first and last frame (often written FLF2V) it gets both ends and fills the gap. This is used for transitions, for a camera move between two views, and for joining clips: the last frame of one clip becomes the first of the next.

Where you meet it in a graph

  • Built-in: WanFirstLastFrameToVideo takes positive, negative, vae, start_image, end_image (and optional CLIP Vision outputs), plus width, height, length, and gives conditioning and a latent to the samplers, just like WanImageToVideo. ComfyUI's Wan 2.2 FLF2V template uses the Wan 2.2 14B i2v models in the usual two-pass graph; there is also a dedicated Wan 2.1 FLF2V 14B model, and Wan 2.2 Fun InP models.
  • WanVideoWrapper: the end_image input of WanVideo Image To Video Encode; it needs a model trained for it.
  • Other families (LTX, HunyuanVideo 1.5) have their own keyframe nodes; follow their templates.

Values and what they change

  • Both pictures should have the clip's size and proportions, and show the same scene; the further apart they are, the stranger the in-between.
  • The prompt describes the motion between them.
  • A longer length gives a slower transition.

Typical mistakes

  • Two unrelated pictures: morphing instead of motion.
  • An end_image on a model not trained for it: ignored or a broken end.
  • Different proportions: one end cropped.

How the app helps

The lesson Two anchors: first and last frame builds this graph on Wan 2.2. The start picture is the anchor comes before it, and A longer video in parts joins clips on shared key frames. On WanVideoWrapper, Video from a picture on WanVideoWrapper mentions end_image.

See also

This page is imported from the application repository's wiki (docs/wiki/concepts/First-And-Last-Frame.md, revision b8e3f71). The same guide is built into the app: Help ▸ User guide.

To refresh it, run npm run import and then npm run build in the website folder.