ComfyUI Node

EMA-VFI Interpolate

The EMA-VFI interpolation node for when speed and a 6GB card matter more than perfection

By ethanfel·Created 7 months ago·Updated about a month ago· 17
EMA-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

If the Tween pack had a "I'm in a hurry and my GPU is small" option, this is it. EMA-VFI Interpolate runs the EMA-VFI frame interpolation model (CVPR 2023, MCG-NJU), which trades a little robustness on extreme motion for being meaningfully faster and lighter than the pack's quality-first options - roughly 1.5GB VRAM per frame pair and noticeably quicker wall-clock times. For the classic use cases - 24→48fps on normal footage, slowing things down, smoothing a pan - it's often the pragmatic pick, and plenty of people run it as their daily driver instead of the fancier models.

Mechanically it works the same way as every pairwise interpolator: EMA-VFI estimates inter-frame motion (via attention that extracts both motion and appearance features, hence the name) and synthesizes the frame in between. multiplier picks 2x/4x/8x (recursive 2x passes), and the output count is the familiar 2N−1, 4N−3, 8N−7.

The inputs you actually touch:

  • model - from the Load EMA-VFI Model node. Wire that first.
  • multiplier - 2x is one pass; 4x and 8x recurse. More frames, longer waits.
  • batch_size - pairs processed at once. Start at 1, raise until VRAM fills. The README's tiering applies: 1 for 8GB, 2–4 for 24GB.
  • chunk_size - process in chunks of N input frames to bound VRAM (0 = off). Output still assembles in RAM, so use the Segment node for real RAM relief.
  • keep_device / all_on_gpu - speed-for-VRAM trades. all_on_gpu is a 48GB+ luxury.
  • source_fps / target_fps - set both (like 24 → 60) and it auto-computes a power-of-2 oversample and picks the nearest frame per target timestamp, overriding multiplier. Downsampling works too.

Outputs are images (the finished batch → VHS Video Combine), oversampled (pre-FPS-selection frames, same as images in plain multiplier mode), and elapsed_seconds.

Install. Search "Tween" in ComfyUI Manager, or:

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

Restart. The model auto-downloads from Google Drive to ComfyUI/models/ema-vfi/ on the first loader run - the loader picks the large ours_t.pkl by default. You'll want VideoHelperSuite for loading and encoding the video.

Where people get burned: EMA-VFI is "less robust on extreme motion" - fast cuts, big jumps, and frantic camera moves can smear where BIM-VFI or SGM-VFI hold up. That's the documented trade, not a bug. And if the output looks subtly off, check which checkpoint the loader grabbed: the _t variants support arbitrary timesteps, the non-_t ones are fixed at the 0.5 midpoint, and mixing that up while assuming you're getting flexible timing is a real source of confusion.

Categoryvideo/EMA-VFI

Inputs (11)

NameTypeDefaultDescription
imagesIMAGEInput image batch. Output frame count: 2x=(2N-1), 4x=(4N-3), 8x=(8N-7).
modelEMA_VFI_MODELEMA-VFI model from the Load EMA-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 more 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.
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.
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