Nodes/Tween - Video Frame Interpolation/SPEED Segment Interpolate
ComfyUI Node

SPEED Segment Interpolate

The SPEED segment node for interpolating long video with a diffusion model, memory intact

By ethanfel·Created 7 months ago·Updated about a month ago· 17
SPEED Segment Interpolate
  • images
  • model
  • settings
  • images
  • model
  • elapsed_seconds
multiplier2
clear_cache_after_n_frames10
keep_devicetrue
all_on_gpufalse
batch_size1
chunk_size0
source_fps0.00
target_fps0.00
seed0
segment_index0
segment_size500

SPEED is the pack's modern default interpolator, but it's also a diffusion model, which means every midpoint it produces started life as random noise. Interpolate a short clip and that's fine. Interpolate a long one and you've got two problems: the assembled output blows past your RAM, and the diffusion's stochastic noise wants to stay reproducible. SPEED Segment Interpolate solves both - it processes one slice at a time with a per-segment seed.

It's the same SPEED pipeline as the plain Interpolate node: multiplier (2x/4x/8x, recursive midpoints), seed, batch_size, chunk_size, keep_device, all_on_gpu, clear_cache_after_n_frames, source_fps/target_fps - plus the segment pair:

  • segment_index (0-based) - which slice to process.
  • segment_size (default 500) - input frames per segment, one-frame overlap for seamless stitching.

The pattern. One node per segment, chained by feeding each node's model output into the next's model input to force sequential execution. Each segment ends in a Video Combine save, freeing RAM before the next segment starts; Tween Concat Videos rejoins the segment_*.mp4 files afterward. Give each segment a seed you can track if reproducibility across runs matters - the same seed per segment plus identical settings reproduces each segment's noise, but changing batching or chunking can still shift how noise is assigned, so don't chase pixel-perfect reruns across a refactor.

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, let the SPEED loader pull the checkpoint and runtime snapshot, and keep VideoHelperSuite installed for load/save.

Common issues. Same trio as every segment node: don't wire two segments to the same source in parallel (chain the model output or the RAM wall returns), keep loader FPS, source_fps/target_fps, and Video Combine frame_rate synchronized, and remember SPEED is stochastic - a "why does this segment look different on rerun" question usually has "you changed a boundary" as the answer.

Categoryvideo/SPEED

Inputs (14)

NameTypeDefaultDescription
imagesIMAGEInput image batch. Output frame count: 2x=(2N-1), 4x=(4N-3), 8x=(8N-7).
modelSPEED_VFI_MODELSPEED model from the Load SPEED Model node.
multiplierCOMBO2SPEED is midpoint-only: 4x and 8x use recursive midpoint passes.
clear_cache_after_n_framesINT101–100Clear CUDA cache every N frame pairs to prevent VRAM buildup. Lower = less VRAM but slower.
keep_deviceBOOLEANtrueKeep the ~235M-parameter model on GPU between batches. Faster, but uses substantial VRAM.
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+. SPEED is stochastic, so changing batch size can change how seeded noise is assigned to pairs.
chunk_sizeINT00–10000Process the source in overlapping chunks to bound VRAM. SPEED remains repeatable for the same seed and settings, but changing chunk or batch boundaries can change its stochastic result.
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.
seedINT00–2147483647SPEED starts from random pixel noise. The seed makes the same execution settings repeatable without reloading the model.
segment_indexINT00–10000Zero-based segment to process. Adjacent segments overlap by one source frame.
segment_sizeINT5002–10000Input frames per segment. Save each segment before processing the next to bound RAM.
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
modelSPEED_VFI_MODEL
elapsed_secondsFLOAT