๐ Prepare Loop Frames
The boring node that makes seamless loops possible
- images
- interp_batch
- original_images
Every seamless loop has a seam, and the seam is a problem: the last frame and the first frame don't line up. The trick the good loop workflows use is to build a transition - interpolate from the last frame to the first frame, then splice those new frames in. Prepare Loop Frames is the node that sets up that transition. It takes your whole clip and hands you two outputs: a tiny 2-frame batch of [last, first], ready for your interpolator, and your original clip passed through untouched.
That's all it does, and that's the point. It's deliberately boring. It exists so that the "interpolate the seam" and "keep the original footage" branches of your graph stay separate and obvious, instead of you manually splitting frame batches with index nodes and getting off-by-one errors at midnight.
How it works
Mechanically it's almost nothing - it pulls the final frame and the first frame off your clip and puts them in their own batch. But the design intent matters: that 2-frame batch is exactly what a RIFE node wants to chew on. Feed it to RIFE VFI Custom Timing (or Interpolate by Multiple), and the interpolator will synthesize the in-between frames that bridge lastโfirst. Because a loop wraps around, that bridge is the transition the viewer will see when the video repeats.
The inputs and outputs
- images - your clip as an IMAGE batch (framesรHรWรC, 0โ1).
- interp_batch (output) - the 2-frame
[last, first]batch. Goes into a WhiteRabbit RIFE node (usually Custom Timing, so you can control the seam timing). - original_images (output) - your untouched clip, wired forward to the final assembly.
Installing it
Part of the WhiteRabbit pack - install once, use all of them:
cd ComfyUI/custom_nodes
git clone https://github.com/Artificial-Sweetener/comfyui-WhiteRabbit
cd comfyui-WhiteRabbit
python -m pip install -r requirements.txt
or search "WhiteRabbit" in ComfyUI Manager and restart. The pack targets ComfyUI's v3 node API, so keep ComfyUI updated; the only pip dependency it adds is torchlanc.
Where people get burned
- Feeding the seam batch straight to the output. The
interp_batchis not your finished video - it's two source frames for interpolation. Don't skip the interpolator. - Losing the original branch. Both outputs are needed downstream. If you drop the
original_imageswire, you have a 2-frame "loop" and nothing else.
The full loop chain looks like: Prepare Loop Frames โ RIFE Seam Timing Analyzer + RIFE VFI Custom Timing on the seam batch โ Assemble Loop Frames to put it all back together. This node is step one, and it's a good one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Your clip as an IMAGE batch (framesรHรWรC, values 0โ1). Outputs: [last, first] for the seam, plus the original clip. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| interp_batch | IMAGE | โ |
| original_images | IMAGE | โ |