ComfyUI Node

BIM-VFI Interpolate

The BIM-VFI interpolation node that actually lets you hit 48fps without OOM-ing

By ethanfel·Created 7 months ago·Updated about a month ago· 17
BIM-VFI Interpolate
  • images
  • model
  • settings
  • images
  • oversampled
  • elapsed_seconds
multiplier2
clear_cache_after_n_frames10
keep_devicetrue
all_on_gpufalse
batch_size1
chunk_size0
source_fps0.00
target_fps0.00

This is the node that turns a 24fps clip into a smooth 48fps one by synthesizing the frames that were never shot. It's video frame interpolation - the same trick your TV's motion smoothing does, except done properly with an actual research model instead of a soap-opera blur smear. BIM-VFI Interpolate is the workhorse of the Tween pack: it takes an image batch (a video decoded to frames), a model from the Load BIM-VFI Model node, and hands you back a longer, smoother batch.

BIM-VFI (CVPR 2025, KAIST VIC Lab) is a "bidirectional motion field-guided" model. The short version: for each pair of consecutive frames it estimates the optical flow in both directions - where each pixel moved - then uses those motion fields to warp and synthesize the in-between frame. It's the pack's strongest general-purpose pairwise option, the one you reach for when you just want the best-looking result and your footage isn't doing anything crazy. The trade-off is honest: it's not the fastest, wants roughly 2GB VRAM per frame pair, and the checkpoint is research/education-licensed, so don't ship a commercial product built on it without asking the authors.

The inputs that matter. The model and images are the only things you must wire up. After that, everything is memory tuning:

  • multiplier - 2x, 4x, or 8x. 2x is one pass (inserts one frame between each pair), 4x and 8x run that same pass recursively. Output counts are 2N−1, 4N−3, 8N−7 frames.
  • batch_size - how many frame pairs run at once. This is the speed/VRAM lever. Start at 1, crank it until your GPU is comfortably full. The tooltips give the cheat sheet: 1 for 8GB, 2–4 for 24GB, 4–16 for 48GB+.
  • chunk_size - process the input in segments of N frames (0 disables). This bounds VRAM but the full output still assembles in RAM, so for genuinely long videos you want the Segment node instead.
  • keep_device and all_on_gpu - keep the model warm on the GPU between pairs, or keep every intermediate frame on the GPU. Both are speed for VRAM trades; all_on_gpu is only worth it on 48GB+ cards.
  • source_fps / target_fps - the sleeper feature. Set both (e.g. 24 → 48) and the node overrides multiplier, oversamples to the nearest power-of-2 up to 8x, then picks the closest frame to each target timestamp. It even handles downsampling.

Three outputs come out: images (the interpolated batch, wire this into a VHS Video Combine to save an mp4), oversampled (the full power-of-2 pass before FPS selection - identical to images when you use the multiplier), and elapsed_seconds, a timing float that's nice for benchmarking but useless unless you're a masochist with a spreadsheet.

Install. Search "Tween" in ComfyUI Manager, or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/Ethanfel/ComfyUI-Tween
pip install -r requirements.txt

Restart ComfyUI. There's no install.py - dependencies come from requirements.txt via Manager, and the model auto-downloads from Google Drive to ComfyUI/models/bim-vfi/ on first load. You'll also want VideoHelperSuite for the Load Video / Video Combine side of the graph; the pack's example workflow (tween_speed_bim_model_lab.json) assumes it.

Where people get burned: feeding it fewer than two frames (it silently passes through), and assuming 8x is free - three recursive passes on a long clip means a lot of pairs, so keep an eye on clear_cache_after_n_frames if you see VRAM creep. And if your first run "hangs," it's probably the Google Drive download, not the node. If the output has wrong-edge halos on blurry or high-motion shots, that's the known BIM-VFI artifact - the loader's artifact_safe_mode exists precisely for that.

Categoryvideo/BIM-VFI

Inputs (11)

NameTypeDefaultDescription
imagesIMAGEInput image batch. Output frame count: 2x=(2N-1), 4x=(4N-3), 8x=(8N-7).
modelBIM_VFI_MODELBIM-VFI model from the Load BIM-VFI Model node.
multiplierCOMBO2Frame rate multiplier. 2x=one interpolation pass, 4x=two recursive passes, 8x=three. Higher = more frames but longer processing.
clear_cache_after_n_framesINT101–100Clear CUDA cache every N frame pairs to prevent VRAM buildup. Lower = less VRAM but slower.
keep_deviceBOOLEANtrueKeep model on GPU between frame pairs. Faster but uses ~200MB VRAM constantly. Disable to free VRAM between pairs (slower due to CPU-GPU transfers).
all_on_gpuBOOLEANfalseStore all intermediate frames on GPU instead of CPU. Much faster (no transfers) but requires enough VRAM for all frames. Recommended for 48GB+ cards.
batch_sizeINT11–64Number of frame pairs to process simultaneously. Higher = faster but uses more VRAM. Start with 1, increase until VRAM is full. Recommended: 1 for 8GB, 2-4 for 24GB, 4-16 for 48GB+.
chunk_sizeINT00–10000Process input frames in chunks of this size (0=disabled). Bounds VRAM usage during processing but the full output is still assembled in RAM. To bound RAM, use the Segment Interpolate node instead. Result is identical to processing all at once.
source_fpsFLOAT0.000–1000Input frame rate. Required when target_fps > 0.
target_fpsFLOAT0.000–1000Target output FPS. When > 0, overrides multiplier and auto-computes a power-of-2 oversample up to 8x, then selects frames. 0 = use multiplier.
settingsoptVFI_SETTINGSAuto-tuned settings from VFI Optimizer. Overrides batch_size, chunk_size, keep_device, all_on_gpu, clear_cache_after_n_frames.

Outputs (3)

NameTypeDescription
imagesIMAGE
oversampledIMAGE
elapsed_secondsFLOAT