ComfyUI Node

Frame Blend

Retime an image sequence without losing smoothness

By drmbt·Created 2 years ago·Updated 7 months ago· 6
Frame Blend
  • image
  • IMAGE
target_frames16
blend_strength1.00
method
loop_seamlessfalse

Frame Blend is a time-remapper for image sequences. You give it a batch of frames and a target count, and it resamples the sequence to that length - shortening or lengthening the clip - while blending between frames so the motion stays smooth instead of stuttering. If you've ever needed a 32-frame animation to play at 24fps, or a 12-frame burst to stretch into a slow loop, this is the node that fixes the pacing without a video editor.

The mechanism

The core idea is simple: choose target_frames, pick an interpolation method, and the node maps your source frames onto the new timeline. The methods:

  • nearest - no blending, just smart frame selection (picks frames at even spacing, always keeping first and last).
  • linear - simple linear blend between neighboring frames.
  • cosine - same idea with a cosine easing curve, giving smoother, less "strobe-y" transitions. The source implements it as (1 - cos(πx)) / 2.
  • RIFE - the headline feature. If you have ComfyUI-Frame-Interpolation installed, an extra use_rife toggle appears and expansion uses the RIFE optical-flow model to synthesize genuinely new intermediate frames instead of crossfading. That's real AI interpolation, not just transparency mixing. It's slower and needs the separate package, but the difference is night and day for 24fps work.

blend_strength (0–1) mixes between fully interpolated and nearest-frame output; loop_seamless makes the sequence interpolate from the last frame back to the first, which is exactly what you want for seamless loop animations. Single-frame input? It just repeats to the target count. Already at target count? Passes through untouched. The edge cases are handled, which is more than most resample nodes can say.

Where it fits

In animation and video workflows - the ones the KB's ecosystem docs describe as living and dying by frame management - Frame Blend sits right after your sampler and before video assembly. A common pattern: generate at a low frame count (faster sampling), then expand to the target fps with RIFE, then feed frames into a video combine node with the pack's Load Media providing FPS and audio. It also plays well with loop_seamless for the looping GIF/boomerang style everyone makes.

The honest caveats: RIFE only works when expanding (target > source); shrinking falls back to smart frame selection. And RIFE requires the separate ComfyUI-Frame-Interpolation install - the node probes for it at import and degrades gracefully to linear/cosine if absent, so you won't get a hard error, just a silent quality drop. If your loops suddenly look less smooth than expected, check whether use_rife actually appeared on the node.

Install

It's in drmbt/comfyui-dreambait-nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/drmbt/comfyui-dreambait-nodes

then restart ComfyUI (ComfyUI Manager: "comfyui-dreambait-nodes"). The pack installs its full dependency list regardless. Add ComfyUI-Frame-Interpolation separately if you want the RIFE path.

Categoryimage/animation

Inputs (5)

NameTypeDefaultDescription
imageIMAGEInput image sequence/batch to be time-remapped
target_framesINT16Desired number of output frames. Can be more or less than input frames.
blend_strengthFLOAT1.000–1How much to blend between frames. 0 = nearest frame, 1 = full interpolation
methodCOMBOInterpolation method: linear (simple), cosine (smooth), or nearest (no blending)
loop_seamlessBOOLEANfalsePreserve seamless looping sequences by interpolating between last and first frame

Outputs (1)

NameTypeDescription
IMAGEIMAGE