KJNodes/imagegenerated

Cross Fade Images(CrossFadeImages)

This node takes two image tensors as input and performs pixel-level blending between corresponding frames of the two sequences based on the specified start frame and transition frame count.

Cross Fade Images

images_1
images_2
IMAGE
interpolation
COMBO
transition_start_index
1
transitioning_frames
1
start_level
0.00
end_level
1.00
KJNodes

The Cross Fade Images node receives two image tensors as input and performs pixel-level blending between corresponding frames of the two sequences based on the specified start frame and number of transition frames.

The Cross Fade Images node is used to create smooth transition effects between two sets of image sequences. It generates a gradual crossfade sequence by blending two images, making it a core tool for creating video transitions or animation crossfades.

Node Functionality

This node receives two image tensors as input and performs pixel-level blending between corresponding frames of the two sequences based on the specified start frame and number of transition frames. Its core mechanism uses an adjustable alpha value (transparency) to control the blending ratio and supports various interpolation functions to alter the change curve during the blending process, thereby affecting the dynamic effect of the transition.

Node Parameter Description - Cross Fade Images

Connection Inputs (Inputs)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
images_1IMAGEYes--: Input the first image sequence, serving as the source for the starting image of the transition.
images_2IMAGEYes--: Input the second image sequence, serving as the source for the target image of the transition.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
interpolationCOMBOYeslinear"linear", "ease_in", "ease_out", "ease_in_out", "bounce", "elastic", "glitchy", "exponential_ease_out": Select the interpolation curve type for the blending transparency change, affecting the dynamic effect of the transition. Options include linear, ease_in, ease_out, ease_in_out, bounce, elastic, glitchy, exponential_ease_out.
transition_start_indexINTYes1-4096 - 4096 (Step: 1): Specifies from which frame of the images_1 sequence the transition begins. Value range is -4096 to 4096, with a step of 1.
transitioning_framesINTYes10 - 4096 (Step: 1): Specifies the number of frames the transition effect lasts. Value range is 0 to 4096, with a step of 1.
start_levelFLOATYes0.00.0 - 1.0 (Step: 0.01): Sets the initial blending strength (alpha value) of images_2 at the start of the transition. Value range is 0.0 to 1.0, with a step of 0.01.
end_levelFLOATYes1.00.0 - 1.0 (Step: 0.01): Sets the final blending strength (alpha value) of images_2 at the end of the transition. Value range is 0.0 to 1.0, with a step of 0.01.

Output

Parameter NameData TypeDescription
IMAGEIMAGE: Outputs the new image sequence after crossfade processing.

Usage Scenarios

In a video production workflow, you can split a video into an image sequence and use this node to blend it with another video sequence to create natural scene transitions. When generating dynamic content, it can also be used to connect image sequences generated by two different prompts, achieving a smooth evolution of style or content.

Notes

When using this node, note that the number of transition frames must not exceed the length of either input sequence, and the transition start index must be within the valid range of the first image sequence. A negative index indicates counting backwards from the end of the sequence.

The Cross Fade Images node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…