Nodes/MKRShift_Nodes/Optical Flow Interpolate
ComfyUI Node

Optical Flow Interpolate

The name is a lie, it's frame blending — and that's fine

By criskb·Created 7 months ago·Updated 5 months ago· 0
Optical Flow Interpolate
  • video
  • video
  • output_path
  • summary
interpolation_factor2
blend_curvesmoothstep
fallback_fps24.0
output_formatauto
filename_prefixMKR_flow_interp
subfolder
overwritefalse
filename_label

Let's get the important thing out of the way: MKROpticalFlowInterpolate does not compute optical flow. There's no motion estimation anywhere in it. What it actually does is take every pair of adjacent frames and blend interpolation_factor intermediate frames between them, using either a linear or a smoothstep ramp. Call it what it is - frame interpolation by cross-dissolve - and it's a genuinely useful utility. Call it optical flow and you'll be disappointed the moment something should have moved along a motion path and instead just faded.

Where it genuinely shines is retiming and smoothing. If you shot or generated at a low frame rate and want a slower, smoother result, or you're padding a sequence so a video node downstream doesn't stutter, this does the job instantly and deterministically. Fast-moving objects get ghosting and smear instead of real motion trails - that's the honest trade-off of a blend-based interpolator. For true motion-aware interpolation you'd reach for a dedicated model (RIFE-class nodes, or the pack's own temporal-blend lane for a different effect).

The inputs that matter

  • video - any video input the pack's video lane accepts (* type, so it's tolerant: an MKR_VIDEO payload or a frame tensor both work).
  • interpolation_factor - 1 to 8, default 2. How many in-between frames per source pair. 2 doubles your frame count; 8 makes it buttery but multiplies render time and file size.
  • blend_curve - linear or smoothstep. Smoothstep is the better default: it eases the blend so motion doesn't feel mechanical. Linear is there if you want a clinical, even dissolve.
  • fallback_fps - 24 default. Used when the input doesn't carry a readable FPS; the output FPS is input_fps × factor.
  • output_format - auto, gif, webp, mp4, mov, webm. Here's the dependency gotcha: mp4/mov/webm need ffmpeg on your system. If it's missing, the node silently falls back to GIF and warns. auto inherits the input's container when possible, else GIF.
  • filename_prefix, subfolder, overwrite, and optional filename_label - where the result lands and whether it clobbers.

The outputs

  • video (MKR_VIDEO) - the interpolated result, wireable into the pack's video chain (concat, mux, presave).
  • output_path - where it was saved. Feed this to anything that needs a file path as a string.
  • summary - output path, factor, warnings. Check it when output silently became GIF.

Installing and the one real dependency

MKRShift Nodes installs via Manager (search "MKRShift") or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

restart. The pack has no requirements.txt - but the README is explicit that ffmpeg is required for the mp4/mov/webm export nodes, and this is one of them. On most systems ffmpeg is already present; if your output unexpectedly comes out as GIF, that's your first suspect. On Ubuntu: sudo apt install ffmpeg. Then re-run.

Gotchas

Beyond the ffmpeg thing, watch the factor. At 4×+ on a long clip you're writing a lot of frames - give it a subfolder so you can find the result, and keep overwrite off while iterating. And reset your expectations once: this is a dissolve interpolator, not motion-aware. Use it to smooth low-FPS footage or stretch a clip for timing, and it'll be one of the more boring, reliable nodes in your graph. Expect it to track a sprinter across the frame and you'll be writing an angry forum post.

CategoryMKRShift Nodes/Media/Video/Edit

Inputs (9)

NameTypeDefaultDescription
video*
interpolation_factorINT21–8
blend_curveCOMBOsmoothstep2 options: linear, smoothstep
fallback_fpsFLOAT24.01–240
output_formatCOMBOauto6 options: auto, gif, webp, mp4, mov, webm
filename_prefixSTRINGMKR_flow_interp
subfolderSTRING
overwriteBOOLEANfalse
filename_labeloptSTRING

Outputs (3)

NameTypeDescription
videoMKR_VIDEO
output_pathSTRING
summarySTRING