ComfyUI > Nodes > ComfyUI-Wan22FMLF > Wan 4-Frame Reference

ComfyUI Node: Wan 4-Frame Reference

Class Name

WanFourFrameReferenceUltimate

Category
ComfyUI-Wan22FMLF
Author
wallen0322 (Account age: 275days)
Extension
ComfyUI-Wan22FMLF
Latest Updated
2025-12-10
Github Stars
0.36K

How to Install ComfyUI-Wan22FMLF

Install this extension via the ComfyUI Manager by searching for ComfyUI-Wan22FMLF
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Wan22FMLF in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Wan 4-Frame Reference Description

Enhances video generation using a four-frame reference system for nuanced, accurate outputs.

Wan 4-Frame Reference:

The WanFourFrameReferenceUltimate node is designed to enhance video generation by utilizing a four-frame reference system. This node is part of the Wan Video Reference Nodes suite, which provides multi-frame reference conditioning for the Wan2.2 A14B I2V models. The primary purpose of this node is to allow users to select four specific frames from a sequence, which are then used as reference points to guide the video generation process. This approach offers a more comprehensive and nuanced reference compared to single or three-frame systems, enabling more accurate and contextually rich video outputs. By adjusting the placement of these frames, users can fine-tune the influence of each frame on the final video, making it a powerful tool for creating videos with specific visual narratives or styles.

Wan 4-Frame Reference Input Parameters:

frame_2_ratio

The frame_2_ratio parameter determines the relative position of the second frame within the sequence. It is expressed as a ratio of the total number of frames, allowing for flexible placement. This parameter impacts how early or late in the sequence the second frame is selected, influencing the transition and continuity between the first and second frames. The value should be between 0 and 1, with a default value typically set to provide a balanced distribution.

frame_3_ratio

Similar to frame_2_ratio, the frame_3_ratio parameter specifies the relative position of the third frame. Adjusting this ratio allows users to control the spacing between the second and third frames, which can affect the pacing and flow of the video. The value should also be between 0 and 1, ensuring that the third frame is appropriately positioned within the sequence.

frame_4_idx_raw

The frame_4_idx_raw parameter is used to determine the position of the fourth frame, typically set to the last frame in the sequence. This parameter ensures that the final frame is included as a reference, providing closure and context to the video. The value is usually set to the total number of frames minus one, ensuring it is the last frame.

Wan 4-Frame Reference Output Parameters:

aligned_pixel_idx

The aligned_pixel_idx output provides the pixel index of each selected frame after alignment. This index is crucial for understanding the exact position of each reference frame within the sequence, ensuring that the frames are correctly spaced and aligned according to the specified ratios.

latent_idx

The latent_idx output gives the latent index of each selected frame, which is used internally to process and generate the video. This index is important for the node's execution, as it determines how the frames are processed and integrated into the final video output.

Wan 4-Frame Reference Usage Tips:

  • To achieve a smooth transition between frames, ensure that the frame_2_ratio and frame_3_ratio are set to values that evenly distribute the frames across the sequence.
  • Experiment with different frame_2_ratio and frame_3_ratio settings to find the optimal balance for your specific video narrative or style.

Wan 4-Frame Reference Common Errors and Solutions:

"Index out of range"

  • Explanation: This error occurs when the calculated frame index exceeds the total number of frames available in the sequence.
  • Solution: Ensure that the frame_2_ratio and frame_3_ratio values are set within the valid range (0 to 1) and that they do not result in indices that exceed the sequence length.

"Invalid frame ratio"

  • Explanation: This error is triggered when the frame ratio parameters are set to values outside the acceptable range.
  • Solution: Double-check that all ratio parameters are between 0 and 1, and adjust them accordingly to fit within the valid range.

Wan 4-Frame Reference Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Wan22FMLF
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.