Skip to content

Wan2.2 First-Last-Frame-to-Video: Control the Beginning and the End ​

The image-to-video lesson from last time solved the "beginning": a photo serves as the first frame, and the motion starts from it. But what about the ending? That was entirely up to the model. This lesson fills in the last piece of control—Wan2.2 first-last-frame-to-video (FLF2V, First-Last-Frame-to-Video): upload one image each for the first frame and the last frame, locking down both the beginning and the end, and let the model fill in the change process in between.

Transformations, blooming flowers, before-and-after comparisons—videos where both the starting point and the endpoint are clearly defined are exactly its home turf.

One convenient thing: you don't need to download a single new model. The official template video_wan2_2_14B_flf2v uses the same 14B I2V dual-expert weights from the last lesson (high noise + low noise), plus the umt5 text encoder and wan_2.1_vae—in the official tutorial's own words: the first-last-frame workflow uses the same model locations as the I2V nodes. There are really only two things to learn: a new node, WanFirstLastFrameToVideo, and a new way of thinking—writing the prompt as a "change process".

What You'll Be Able to Do After This Lesson ​

  • Load the official Wan2.2 14B FLF2V template, upload the two first- and last-frame images, and generate a first-last-frame transition video at 640×640, 81 frames, about 5 seconds
  • Explain the essential difference between this lesson and image-to-video: WanFirstLastFrameToVideo locks in one extra end_image
  • Adjust parameters by the rules: width and height step 16, frame count 4n+1, and go up to around 720P when VRAM allows
  • Use Ctrl+B to switch between the 20-step standard version and the 4-step Lightning LoRA accelerated version
  • Write a prompt describing "how it changes from the first frame to the last frame," not just describing a single image

Your Current Predicament ​

  • You want to make videos like "transformations" or "before-and-after comparisons"; both keyframes are already drawn, and all that's missing is the segment to fill in the middle
  • Text-to-video can't control the ending, and image-to-video can only lock the beginning—the ending is entirely at the model's whim
  • Trying to force-modify the last lesson's workflow: WanImageToVideo only locks the first frame, with no input for a last frame

When to Use This Technique ​

When you need to:

  • Fill in a smooth transition between two keyframes: transformations, scene transitions, before-and-after product use
  • Have the video's beginning and end both match your images exactly
  • Reuse the I2V model files from the last lesson without downloading a single new large weight

And you don't want to:

  • Roll the dice repeatedly, waiting for the model to happen to generate the ending you want
  • Switch to new models: FLF2V uses the same Wan2.2 14B I2V dual-expert weights

🎒 Preparation Before Starting ​

  • Have gottenWan2.2 14B image-to-video working: the four model files from the last lesson are in place—wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors, wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors, umt5_xxl_fp8_e4m3fn_scaled.safetensors, wan_2.1_vae.safetensors
  • ComfyUI 0.3.31 or above (the minimum version the official template library marks for this template)
  • Prepare two images: the first frame and the last frame, keeping the aspect ratio consistent (see the pitfall note for why); if you don't have material, start with the sample images included in the template
  • Have a sense of your VRAM: the official measurement on an RTX 4090D 24 GB at 640×640 showed 84% usage; the template's small default size is designed for low VRAM—get it running first, then scale up

Core Idea ​

The new things in this lesson in three sentences:

  1. FLF2V = image-to-video with both the first and last frames locked. Last lesson's WanImageToVideo only encoded the first frame into the conditioning; WanFirstLastFrameToVideo fixes the first frame and last frame respectively at the beginning and end of the latent, with the middle frames interpolated by the model according to the prompt—which is why these videos are also called first-last-frame interpolation videos.
  2. Zero new models. The official tutorial states it plainly: the model locations in the first-last frame workflow are the same as in the I2V workflow. The four files downloaded in the previous lesson are reused as-is; if you want to speed things up, add two optional LoRAs.
  3. The prompt shifts from "describing a scene" to "describing a process." The template example reads "an ice-crystal kitten is startled awake, gradually grows colorful fur and transforms into a giant beast" — starting point, process, and endpoint all written in one sentence.
Image-to-video (previous lesson)First-last frame to video (this lesson)
NodeWanImageToVideoWanFirstLastFrameToVideo
Locked framesFirst frame 1 imageFirst frame + last frame, 2 images in total
PromptDescribes the visuals of this video clipDescribes the process of change from the first frame to the last frame
Model fileswan2.2_i2v_* Dual-expertSame as on the left, fully reused

The new node's parameter rules (fixed by the source-code schema): width / height step 16, length step 4 (valid values 4n+1: 49, 81, 121...), batch_size defaults to 1.

Follow along ​

Step 1: Load the Wan2.2 first-last frame template ​

Why: the official template comes with two complete workflows (a 20-step standard version plus a Lightning accelerated version) and all default parameters preconfigured, so starting from the template means no missed nodes and no wrongly filled parameters.

  1. Open the template library (Browse Templates) and search for "Wan2.2 14B FLF2V" (the template name in the English interface is Wan 2.2 14B First-Last Frame to Video)
  2. Click to load

You should see:

  • The canvas split into two large groups: Default workflow (enabled by default) and Enable lightning lora version (bypassed by default)

  • Each group is laid out as Step 1 Load models → Step 2.1 Upload start_image → Step 2.2 Upload end_image → Step 3 Video size & length → Step 4 Prompt

  • The file names in the four model loaders (two Load Diffusion Model, Load CLIP, Load VAE) are exactly the same as in the previous lesson

  • A few sticky notes such as Model Links and VRAM Usage on the canvas, with no red nodes anywhere

  • Template loaded, no red nodes on the canvas

Step 2: Upload the first frame and last frame images ​

Why: these two images are the video's first and last frames, and everything the model generates is constrained between these two points.

  1. Upload the first frame in the Load Image node of the Step 2.1 - Upload start_image group
  2. Upload the last frame in the Load Image node of the Step 2.2 - Upload end_image group
  3. No source material? The template ships with the sample images video_wan2_2_14B_flf2v_start_image.png and video_wan2_2_14B_flf2v_end_image.png, which can be downloaded directly from the official tutorial page

You should see: one image appears in each of the two Load Image nodes, connected respectively to the start_image and end_image inputs of WanFirstLastFrameToVideo.

  • First frame and last frame both in place

⚠️ Both images will be scaled to the node's dimensions

WanFirstLastFrameToVideo will bilinearly scale both images to the node's width / height, center them, and then encode them. If the two images have mismatched aspect ratios, they will be stretched and distorted — unify the aspect ratio first, or adjust the node's width and height to match the images' ratio.

Step 3: Set the video dimensions and frame count ​

Why: the template's default 640×640 is the small size the officials prepared for low-VRAM users; change anything you like within the rules, and going outside the rules will cause problems.

The four parameters of WanFirstLastFrameToVideo:

ParameterTemplate defaultRuleNotes
width640Step 16Must be a multiple of 16
height640Step 16Must be a multiple of 16
length81Step 4, takes 4n+181 frames ÷ 16fps ≈ 5 seconds
batch_size1—How many clips to generate at once
  1. First run it through with the default 640×640 and 81 frames
  2. Scale up only if you have VRAM to spare: the official tutorial's suggestion is "around 720P resolution," for example 1280×720 (both are multiples of 16)
  3. Change the duration via length (49 is about 3 seconds, 121 is about 7.5 seconds), and change the frame rate in the CreateVideo node (the template sets 16)

You should see: the values in the parameter boxes increase and decrease in steps, and values like 641 will never appear.

  • Remember two rules: width and height must be multiples of 16, frame count must be 4n+1

Step 4: Write a "process of change" prompt and generate ​

Why: the first and last frames already lock down the start and end points, so the prompt's job is to tell the model how the middle changes.

  1. In the CLIP Text Encode (Positive Prompt) node, describe the change process. The template's built-in example:
text
A kitten made of ice crystals is suddenly startled awake; the angry kitten lifts its head, gradually grows colorful fur and transforms into
a giant beast, baring its teeth as if it has spotted danger, eyes wide open

One sentence covers the start (ice-crystal kitten), the process (startled awake, growing colorful fur), and the end (a teeth-baring, wide-eyed giant beast) — follow this structure to describe the change between your own two images.

  1. Keep the template's built-in Chinese negative prompt paragraph unchanged (identical to the one in the I2V template from the previous lesson):
Expand to see the template's built-in negative prompt
text
Vivid colors, overexposed, static, blurred details, subtitles, style, work, painting, picture, still,
overall grayish, worst quality, low quality, JPEG compression artifacts, ugly, incomplete, extra fingers,
poorly drawn hands, poorly drawn face, deformed, disfigured, limbs with deformed shapes, fused fingers,
motionless picture, cluttered background, three legs, many people in the background, walking backwards
  1. Confirm the sampling parameters are the template defaults: both KSamplers run 20 steps each, cfg 4, euler + simple, with the high-noise model running 0–10 steps and the low-noise model running 10–20 steps; the shift of both ModelSamplingSD3 nodes is 8
  2. Run with Ctrl+Enter

You should see: the two KSamplers run 10 steps each in sequence; the first and last frames of the output video match the two images you uploaded, with the prompt-described change process in between. The video is saved by the SaveVideo node into the video/ subdirectory of the output directory, 640×640, 81 frames, 16fps, about 5 seconds.

  • The output video's first and last frames match the two uploaded images

Step 5: Switch to the 4-step Lightning LoRA accelerated version (optional) ​

Why: the 20-step standard version takes about 536 seconds for the first generation on an RTX 4090D; the template's built-in Lightning LoRA version needs only 4 steps, with a reference time of about 108 seconds — much faster when testing compositions.

  1. First download the two acceleration LoRAs (1.14 GB each) and put them into models/loras/: wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors and wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors (both are available in the Wan_2.2_ComfyUI_Repackaged repositories on Hugging Face and ModelScope)
  2. Box-select the Default workflow group and press Ctrl+B to bypass it
  3. Box-select the Enable lightning lora version group and press Ctrl+B to enable it
  4. Confirm the Lightning group's parameters: both LoRA strengths are 1, the shift of ModelSamplingSD3 is 5, both KSamplers run 4 steps each, cfg 1, with the high-noise model running 0–2 steps and the low-noise model running 2–4 steps
  5. Note: the Lightning group has its own set of Load Image and prompt nodes — after switching over, you need to re-upload your first and last frames and paste your prompts in this group (it comes with its own English example by default)
  6. Run

You should see: sampling runs only 4 steps (high-noise 2 + low-noise 2), generation is noticeably faster; the output is still 640×640, 81 frames, 16fps.

  • The two workflow groups toggle each other, and only one group is enabled at a time

⚠️ The cost of acceleration is motion

The template sticky note says verbatim: using Wan2.2 Lightning LoRA loses some of the video's motion, but shortens generation time. Use the 4-step version when testing compositions, and switch back to the 20-step standard version for the final render.

💡 After switching, check the other group's status

The template sticky note specifically reminds you: after enabling one group, don't forget to bypass the other group with Ctrl+B, otherwise both groups will run at the same time; you can also try the partial execution feature.

Checkpoints ✅ ​

  • The first-last frame video runs successfully: the beginning and end match the two uploaded images, with a smooth transition in between
  • Can explain the difference between WanFirstLastFrameToVideo and WanImageToVideo: the former has an extra end_image
  • Knows that width and height have a step of 16 and length takes 4n+1, and can change resolution and duration independently
  • Can use Ctrl+B to switch between the 20-step standard version and the 4-step Lightning version, and confirm the other group is bypassed
  • The prompt describes the "change process," including the start, the process, and the end

Pitfall reminders ​

❌ The two images have different aspect ratios, resulting in distortion ​

The node bilinearly scales both images to width / height and centers them before encoding, so different aspect ratios get stretched.

Correct approach: make the two images the same aspect ratio first; or change the node's width and height to match the images' aspect ratio — for example, if both are 3:4 portrait images, set a 3:4 size that is a multiple of 16, such as 576×768.

❌ Enabled the Lightning group but forgot to bypass the standard group ​

The template contains two complete workflows. The template sticky note warned verbatim: if you don't want both groups running at the same time, don't forget to Ctrl+B bypass the other group after enabling one.

Correct approach: after switching, scan the canvas to confirm only one group is enabled.

❌ Filled in 80 frames and 641 for width and height ​

length has a step of 4, and valid values are 4n+1 (49, 81, 121…); width / height have a step of 16. Following the steps in the interface won't go wrong, but when passing values in from other nodes, you have to follow the rules yourself.

Correct approach: pick the frame count from 49 / 81 / 121, and pick width and height from multiples of 16; 640×640 is the template default, and 1280×720 is a valid combination for 720P.

❌ Downloaded the wrong weights: FLF2V uses the files from I2V ​

The first-last frame template loads the two files wan2.2_i2v_*_14B_fp8_scaled, not the Wan2.2 14B text-to-video lesson's wan2.2_t2v_*. The official tutorial's original words: the first-last frame workflow uses the same model locations as the I2V section.

The correct approach: check the filenames of the four loaders one by one; they are exactly the same as in the previous image-to-video lesson.

Advanced Tips (Optional) ​

Add a "Consistency Constraint" Section to Your Prompt ​

The English example prompt that comes with the template's Lightning group is in two parts: the first part describes the transformation process (a Van Gogh self-portrait-style bearded man slowly turning into an astronaut—the beard fading out strand by strand, the straw hat melting into a helmet, the background brushstrokes gradually becoming a starry sky); the second part specifically constrains the camera and consistency (fixed camera position, slight slow push-in, soft lighting, centered composition unchanged).

First-last frame videos are especially vulnerable to erratic camera movement—follow this structure and add a consistency constraint section to your prompt too.

Set the Direction of Change Freely ​

There is no fixed formula for the start and end points: an unboxing video can go "intact packaging → the product held in hand," or be shot in reverse as a "restoration process." Just swap the positions of the two images in Load Image.

Want a Longer Narrative ​

That's the extent of Wan2.2's single-segment videos. For multi-shot narratives and longer pieces, see LTX-2.5: Multi-Shot Narrative, 4K HDR and DFR—LTX-2.5 likewise offers a first-last frame (FLF2V) workflow template.

Lesson Summary ​

✅ This lesson added "control over the ending" to video, getting the Wan2.2 first-last frame-to-video pipeline running:

  • ✅ First-last frame to video: WanFirstLastFrameToVideo upload a first frame and a last frame image, and the model fills in the middle based on the prompt
  • ✅ Zero new models: reuse the dual-expert weights from the previous I2V lesson, with only two optional acceleration LoRAs added
  • ✅ Parameter rules: width/height step 16, length takes 4n+1; defaults 640×640, 81 frames, 16fps, about 5 seconds
  • ✅ Two-speed output: 20-step standard version (reference time about 536 seconds) ↔ 4-step Lightning version (about 108 seconds), toggle with Ctrl+B

Review of key configuration fields:

FieldRecommended ValueNotes
Load Diffusion Model ×2wan2.2_i2v_high/low_noise_14B_fp8_scaled.safetensorsSame as the image-to-video lesson
Load CLIPumt5_xxl_fp8_e4m3fn_scaled.safetensorsset type to wan
Load VAEwan_2.1_vae.safetensors
WanFirstLastFrameToVideo640×640 / length 81 / batch 1width/height step 16, length takes 4n+1
KSampler ×220 steps / cfg 4 / euler + simplehigh-noise 0–10 steps, low-noise 10–20 steps
ModelSamplingSD3 ×2shift 8 (Lightning group uses 5)
CreateVideofps 1681 frames ≈ 5 seconds
Lightning LoRA ×2strength 1, 4 steps / cfg 1bypassed by default, enable with Ctrl+B; high-noise 0–2, low-noise 2–4 steps

Next Lesson Preview ​

Wan2.2 wraps up here; the next lesson switches to a model with built-in audio: LTX-2/2.3: Generating Videos with Sound in One Go. You will learn:

  • LTX-2's six workflows: T2V, I2V, FLF2V, IA2V, IC-LoRA, ID-LoRA
  • What audio-visual synchronized video generation feels like
  • Distilled version's 8-step, CFG=1 acceleration tricks

Appendix: Source Code Reference ​

Click to expand and view source code locations

Last updated: 2026-11-06 (template library template video_wan2_2_14B_flf2v, officially marked minimum ComfyUI version 0.3.31)

ContentLocation
Official tutorial (Wan2.2, including the FLF2V section)https://docs.comfy.org/tutorials/video/wan/wan2_2
Workflow template JSONhttps://github.com/Comfy-Org/workflow_templates/blob/main/templates/video_wan2_2_14B_flf2v.json
Weights repository (Hugging Face)https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged
Weights repository (ModelScope mirror)https://modelscope.cn/models/Comfy-Org/Wan_2.2_ComfyUI_Repackaged
WanFirstLastFrameToVideo node source codecomfy_extras/nodes_wan.py (starting at L188, parameter steps L198–L201)
WanImageToVideo node source codecomfy_extras/nodes_wan.py (starting at L18)

The parameters on this page (640×640 / length 81 / fps 16, 20 steps cfg 4 euler + simple, high-noise 0–10 / low-noise 10–20, shift 8, Lightning 4 steps cfg 1 / shift 5, model file names and sizes, RTX 4090D reference times and VRAM usage) were all verified against the actual node values and built-in notes in the template JSON video_wan2_2_14B_flf2v.json; the 720P recommendation and "the model location is the same as I2V" come from the official tutorial; node parameter step sizes were verified against the comfy_extras/nodes_wan.py source code.