Nodes/CRT-Nodes/Seamless Loop Blender (CRT)
ComfyUI Node

Seamless Loop Blender (CRT)

Seamless Loop Blender (CRT)

By PGCRT·Created 2 years ago·Updated a day ago· 132
Seamless Loop Blender (CRT)
  • images
  • IMAGE
blend_frames12
enabledtrue

Seamless Loop Blender (CRT) turns a video whose first and last frames don't match into a loop that does. It takes a batch of frames, blends the tail of the clip with a reversed copy of the head, and returns a sequence where the last frame is identical to the first - so when the video plays back on repeat, you can't see where it joins. It's the standard fix for the one thing every video model gets wrong on purpose: it renders you a clip, not a loop.

That mismatch is the structural problem. When you generate a video for a seamless-loop use case - a looping background, a GIF, a product shot on a carousel - you want frame N to flow straight back into frame 0. Diffusion models don't know that. The last frame and the first frame are almost always different, and the join is a visible pop. This node is the boomerang-style remedy: it fades the final frames into a reversed version of the opening frames, so the transition across the loop boundary is a crossfade instead of a jump.

The mechanism is worth understanding because it sets your expectations. With blend_frames set to 12, the node takes the last 12 frames of the clip and the first 12 frames, reverses the head section, and crossfades from the tail into that reversed head using a linear alpha ramp. The very last output frame is, by construction, an exact copy of the first frame - that's the guarantee that makes the loop seamless. The cost is that the last blend_frames frames are now a blend, so motion in that window gets softened. The trade is baked in: longer blends are smoother but more visibly "dreamy" at the loop point; 12 frames is a sensible middle ground for most 30fps clips.

Inputs: images (your frame batch - from a VAE decode or a video loader), blend_frames (default 12), and enabled (default true). The enabled toggle is there so you can leave the node in the graph and switch the blending on and off for A/B comparison without rewiring. Output is a single IMAGE batch, ready to hand to a video encoder or preview. If your clip is shorter than blend_frames + 1, it prints a warning and passes the frames through untouched rather than doing something weird with too little material.

A realistic workflow: generate your video, decode to frames, run Seamless Loop Blender, save. Some people add a short Video Duration Calculator check to confirm the loop length still fits their target. Install with the pack (ComfyUI Manager → search "CRT-Nodes", or clone https://github.com/plugcrypt/CRT-Nodes.git into custom_nodes and restart). It's pure tensor blending - no models, no extra dependencies.

CategoryCRT/Video

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
blend_framesINT121–256
enabledBOOLEANtrue

Outputs (1)

NameTypeDescription
IMAGEIMAGE