Nodes/ComfyUI-Buff-Nodes/Frame Rate Modulator (Buff)
ComfyUI Node

Frame Rate Modulator (Buff)

Make your clips the frame count you need, not the frame count you got

By BuffMcBigHuge·Created 2 years ago·Updated 20 days ago· 2
Frame Rate Modulator (Buff)
  • images
  • images
  • frame_count
modeframe_count
target_frame_count30
frame_multiplier1.0
interpolationlinear
loop_modeclamp

Video models are picky about frame counts. One generates 49 frames, another wants 25 or 81, and suddenly your pipeline is broken because clip A and clip B won't line up. FrameRateModulator exists to fix that mismatch: it resamples an image batch to an exact target frame count or to a multiple of what it started with, with real interpolation between the frames rather than just dropping or duplicating them.

This is a temporal-plumbing node more than a VFX node. Its highest-value use is standardization - taking clips from different sources and normalizing them to the same frame count before they hit a model or a merger. Slow-motion (2× frames) and speed-up (0.5×) are the fun modes, but the honest answer is that for actual slow motion you'd typically want RIFE-style frame interpolation. This node's linear and cubic resampling is smooth blending, not motion-aware generation: it will blend and ghost where RIFE would infer. Know that going in and it won't disappoint.

How it works

ComfyUI image batches are [frames, height, width, channels]. The node maps a set of output positions back onto the input timeline - output frame i at input position i * (n-1) / (m-1) - then samples each position. nearest just picks the closest frame (fast, juddery, great for previews). linear blends the two surrounding frames. cubic fits a 4-point curve through the neighbors for smoother motion. When a sample lands outside the clip, loop_mode decides what to do: clamp holds the first/last frame, repeat wraps around, mirror bounces back and forth for a ping-pong loop.

In frame_count mode you name the exact target (1–10000). In multiplier mode you scale by a factor (2.0 = double the frames, 0.5 = half). If input and output counts happen to match, it short-circuits and returns your batch untouched.

Inputs and outputs

The ones you'll set: mode, then either target_frame_count or frame_multiplier; interpolation (nearest/linear/cubic, default linear); loop_mode (default clamp). Two outputs: the resampled images batch, and frame_count as an integer - handy for wiring into nodes that need to know how many frames they just got.

Install and gotchas

Part of BuffMcBigHuge's QoL pack - ComfyUI Manager, search "ComfyUI-Buff-Nodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/BuffMcBigHuge/ComfyUI-Buff-Nodes

Restart ComfyUI. No extra dependencies, no models. The RAFT nodes in the same pack download weights on first use, but this one is pure tensor math.

Where people get burned: expecting real slow motion from linear on big motion (you get smearing - that's not a bug, it's interpolation); forgetting that multiplier mode rounds down to an integer frame count; and using nearest for anything you actually intend to look at. For the core job - "I have 67 frames and need 81 to feed this model" - it's a clean, dependable tool.

CategoryImage/Animation

Inputs (6)

NameTypeDefaultDescription
imagesIMAGEInput batch of images to resample
modeCOMBOframe_countframe_count: Set exact number of output frames multiplier: Scale input frame count by a factor
target_frame_countoptINT301–10000Target number of frames for output (used when mode is 'frame_count')
frame_multiplieroptFLOAT1.00.1–10Multiplier for frame count (used when mode is 'multiplier'). 2.0 = double frames (slow motion), 0.5 = half frames (speed up)
interpolationoptCOMBOlinearInterpolation method: nearest: No interpolation, duplicate/skip frames linear: Linear blending between adjacent frames cubic: Smooth cubic interpolation
loop_modeoptCOMBOclampHow to handle out-of-bounds frames: clamp: Use first/last frame repeat: Loop the sequence mirror: Reverse and repeat

Outputs (2)

NameTypeDescription
imagesIMAGE
frame_countINT