VAE Decode Loop KJ(VAEDecodeLoopKJ)
This node performs a decoding operation based on the Variational Autoencoder (VAE) model, taking a latent tensor containing multiple frames as input.
VAE Decode Loop KJ
The VAE Decode Loop KJ node performs decoding operations based on a Variational Autoencoder (VAE) model, receiving a latent tensor containing multiple frames as input.
VAE Decode Loop KJ is a decoding node specifically designed for video generation workflows. Its core function is to decode the latent representation of a video into an image sequence, with special optimization for transitions between the first and last frames to eliminate seams or visual artifacts that may occur during looped playback.
Node Function
This node performs decoding operations based on a Variational Autoencoder (VAE) model, receiving a latent tensor containing multiple frames as input. Its core technical mechanism involves specifying the overlap_latent_frames parameter to perform mixed decoding and fusion on a portion of the latent frames at the end and beginning of the sequence, thereby generating a visually seamless looped image sequence. It supports standard LATENT and VAE model input formats.
Node Parameter Description - VAE Decode Loop KJ
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
samples | LATENT | Yes | - | - | The latent to be decoded. |
vae | VAE | Yes | - | - | The VAE model used for decoding the latent. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
overlap_latent_frames | INT | Yes | 2 | 2 - 8 (Step: 1) | Number of frames to blend for seamless loop, for Wan 2 works and HunyuanVideo 1.5 should use 4 |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| IMAGE | IMAGE | The decoded image sequence output from the VAE. |
Usage Scenarios
This node is very useful when creating seamless looped short videos or dynamic textures. For example, after generating a looped animation, you can connect the output latent sequence to this node and adjust the number of overlapping frames to smooth the transition between the beginning and end, ultimately outputting a coherent image sequence ready for looped playback.
Notes
When using this node, note that the optimal value for the overlap_latent_frames parameter may vary depending on the underlying video model used. For instance, for specific models like Wan 2 or HunyuanVideo 1.5, setting this value to 4 may be necessary for best results.
VAE Decode Loop KJ Node Source Code Link
The VAE Decode Loop KJ node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.