Skip to content
ComfyDeploy

Wan 2.2 First and Last Frame to Video

Provide a starting image and an ending image and a prompt, and Wan 2.2 generates the video that connects them. Built from native ComfyUI nodes with 4-step Lightning LoRAs for speed.

How it works

Two LoadImage nodes supply the first and last frames, and ResizeAndPadImage nodes fit them to a common size. GetImageSize passes the dimensions on so both frames match the video.

The WanFirstLastFrameToVideo node builds the conditioning from both images, a CLIPTextEncode prompt and a negative prompt. Text is encoded with umt5_xxl_fp8_e4m3fn_scaled.safetensors and latents are decoded with wan_2.1_vae.safetensors.

Wan 2.2 uses two experts. wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors handles the early steps and wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors finishes the detail. Each one has its own ModelSamplingSD3 node, a Lightning LoRA (Wan2.2-Lightning_I2V-A14B-4steps-lora_HIGH_fp16 and ..._LOW_fp16), and a KSamplerAdvanced stage. CreateVideo and SaveVideo write the result.

Tips

  • Pick two frames that share lighting and subject. The model fills in motion, but large differences produce abrupt morphs.
  • Describe the motion between the frames in the prompt, not only what the frames look like.
  • The included negative prompt is the standard Chinese Wan negative prompt. Leave it as is unless you see a specific artifact.
  • To make a looping clip, use the same image for both frames.

Run it as an API

You can deploy this workflow on ComfyDeploy as a hosted API endpoint. The inputs listed above become the request fields, so your own app can submit them and receive the finished result without running ComfyUI yourself. The same workflow can also be run and shared from the ComfyDeploy playground in your browser.

What you can use it for

  • Morphing between two product shots
  • Animating a scene change between two stills
  • Storyboard to motion previews
  • Looping clips by reusing the first frame as the last

Run it in three steps

  1. Open the template

    Click Run on ComfyDeploy. The workflow, its custom nodes and models are set up for you on a cloud machine.

  2. Add your inputs

    Provide first frame image and last frame image in the playground or the ComfyUI editor.

  3. Run, share or deploy

    Run it on an L40S, share it with your team as a playground, or deploy it as an API endpoint.

Frequently asked questions

What GPU does this Wan 2.2 first-last-frame workflow need?

It is set up for an L40S on ComfyDeploy. It loads the 14B fp8 high-noise and low-noise models.

Why does it run fast?

Both Wan 2.2 models have a Lightning 4-step LoRA applied, so each sampler stage needs only a few steps.

How do I run it as an API?

Deploy it on ComfyDeploy and call the endpoint with the two frames and a prompt. The video file is returned.

Related workflows

All Wan workflows