Commit Graph

23 Commits

Author SHA1 Message Date
9f66233b53 Add VFI Optimizer node for auto-tuning hardware settings
Benchmarks the user's GPU with the actual model and resolution via a
single calibration frame pair, then outputs optimal batch_size,
chunk_size, keep_device, all_on_gpu, and clear_cache_after_n_frames
as a connectable VFI_SETTINGS type. All 8 Interpolate/SegmentInterpolate
nodes accept the new optional settings input — existing workflows
without the optimizer work unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 22:15:48 +01:00
4723dc329d Add cupy check to Load nodes with install instructions
BIM-VFI, SGM-VFI, and GIMM-VFI Load nodes now check for cupy at
load time and raise a clear error with the user's CUDA version and
the exact pip install command. Updated README with step-by-step
cupy install instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 13:15:44 +01:00
396dafeefc Fix warp cache buildup when all_on_gpu is enabled
The all_on_gpu guard was preventing warp cache clearing and
torch.cuda.empty_cache() from ever running, causing unbounded
VRAM growth during long interpolation runs. Cache clearing now
runs on the clear_cache_after_n_frames interval regardless of
the all_on_gpu setting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:27:47 +01:00
13a89c5831 Add console logging to all VFI interpolation nodes
Log mode/params, pass progress, chunk count, and output frame count
for BIM-VFI, EMA-VFI, SGM-VFI, and GIMM-VFI interpolation nodes.
Segment nodes also log their input frame range and target fps output range.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:14:11 +01:00
2f1cc17f5c Add oversampled image output to all VFI Interpolate nodes
Second IMAGE output exposes the full power-of-2 oversampled frames
before target FPS selection. Identical to the first output when
target_fps=0. Document the new output in README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 17:39:58 +01:00
6dd579dcc7 Add target FPS mode to all VFI models and remove concat preview
Add source_fps/target_fps inputs to all 4 Interpolate and Segment nodes
(BIM, EMA, SGM, GIMM). When target_fps > 0, auto-computes optimal
power-of-2 oversample, runs existing recursive t=0.5 interpolation,
then selects frames at target timestamps. Handles downsampling (no
model calls), same-fps passthrough, and high ratios (e.g. 3→30fps).
Segment boundary logic uses global index computation for gap-free
stitching. When target_fps=0, existing multiplier behavior is preserved.

Remove video preview from TweenConcatVideos: drop preview input,
delete web/js/tween_preview.js, remove WEB_DIRECTORY from __init__.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 22:51:04 +01:00
d642255e70 Add GIMM-VFI support (NeurIPS 2024) with single-pass arbitrary-timestep interpolation
Integrates GIMM-VFI alongside existing BIM/EMA/SGM models. Key feature: generates
all intermediate frames in one forward pass (no recursive 2x passes needed for 4x/8x).

- Vendor gimm_vfi_arch/ from kijai/ComfyUI-GIMM-VFI with device fixes
- Two variants: RAFT-based (~80MB) and FlowFormer-based (~123MB)
- Auto-download checkpoints from HuggingFace (Kijai/GIMM-VFI_safetensors)
- Three new nodes: Load GIMM-VFI Model, GIMM-VFI Interpolate, GIMM-VFI Segment Interpolate
- single_pass toggle: True=arbitrary timestep (default), False=recursive like other models
- ds_factor parameter for high-res input downscaling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 13:11:45 +01:00
769da2586e Fix SGM-VFI auto-download: correct file extension .pth → .pkl
The Google Drive folder contains .pkl files but the default model
name used .pth, causing the post-download existence check to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:45:13 +01:00
d935462e24 Support relative paths and robust preview in TweenConcatVideos
Relative output_directory values are now resolved against ComfyUI's
output directory. Video preview is skipped with a warning when the
output path is outside the output tree (frontend can't serve it).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:30:48 +01:00
aa85f523f2 Add optional video preview to TweenConcatVideos
Uses ComfyUI's ui/gifs return dict to show the concatenated video
directly on the node, matching the VHS Video Combine pattern.
Togglable via a preview boolean input (default True).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:16:01 +01:00
fc4efb8b17 Rename BIMVFIConcatVideos to TweenConcatVideos
The concat node is model-agnostic (just joins video segments via
ffmpeg), so it shouldn't be under BIM-VFI. Now accepts any model type
as the dependency input and lives under the video/Tween category.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:12:16 +01:00
e37cc3dd2e Rename project to ComfyUI-Tween
Update logger names, install prefixes, README clone instructions, and
error messages to reflect the new repo name. Model-specific node names
and categories (BIM-VFI, EMA-VFI, SGM-VFI) are unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:08:54 +01:00
42ebdd8b96 Add SGM-VFI (CVPR 2024) frame interpolation support
SGM-VFI combines local flow estimation with sparse global matching
(GMFlow) to handle large motion and occlusion-heavy scenes. Adds 3 new
nodes: Load SGM-VFI Model, SGM-VFI Interpolate, SGM-VFI Segment
Interpolate. Architecture files vendored from MCG-NJU/SGM-VFI with
device-awareness fixes (no hardcoded .cuda()), relative imports, and
debug code removed. README updated with model comparison table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 23:02:48 +01:00
1de086569c Add EMA-VFI (CVPR 2023) frame interpolation support
Integrate EMA-VFI alongside existing BIM-VFI with three new ComfyUI nodes:
Load EMA-VFI Model, EMA-VFI Interpolate, and EMA-VFI Segment Interpolate.

Architecture files vendored from MCG-NJU/EMA-VFI with device-awareness
fixes (removed hardcoded .cuda() calls), warp cache management, and
relative imports. InputPadder extended to support EMA-VFI's replicate
center-symmetric padding. Auto-installs timm dependency on first load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 22:30:06 +01:00
0133f61d47 Add delete_segments option to Concat Videos node
Cleans up individual segment files after successful concatenation,
preventing leftover files from polluting subsequent runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 21:11:55 +01:00
98c558b1b0 Add BIM-VFI Concat Videos node for joining segment outputs
Adds a new node that concatenates segment video files (produced by
VHS Video Combine) into a single video using ffmpeg's concat demuxer
with -c copy (no re-encoding). The model input acts as a sequencing
signal to ensure all segments finish before concatenation begins.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 21:06:52 +01:00
7cf7162143 Add BIM-VFI Segment Interpolate node for bounded peak RAM
Processes numbered segments of the input batch so users can chain
multiple instances with Save nodes between them, freeing each segment's
output before the next starts. Model pass-through output forces
sequential execution via ComfyUI's dependency graph.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 20:13:02 +01:00
3e8148b7e2 Add chunk_size for long video support, fix cache clearing, add README
- chunk_size input splits input into overlapping segments processed
  independently then stitched, bounding memory for 1000+ frame videos
  while producing identical results to processing all at once
- Fix cache clearing logic: use counter instead of modulo so it triggers
  regardless of batch_size value
- Replace inefficient torch.cat gather with direct tensor slicing
- Add README with usage guide, VRAM recommendations, and full
  attribution to BiM-VFI (Seo, Oh, Kim — CVPR 2025, KAIST VIC Lab)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 19:08:42 +01:00
993a3a72b1 Add batch processing support for faster frame interpolation
Processes multiple frame pairs simultaneously instead of one-by-one.
New batch_size input (1-64) lets users trade VRAM for speed.
Refactored pyr_level logic into shared _get_pyr_level() helper.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:54:40 +01:00
69a4aebfe7 Add auto_pyr_level toggle to select pyramid level by resolution
When enabled (default), automatically picks the optimal pyr_level
based on input height: <540p=3, 540p=5, 1080p=6, 4K=7.
When disabled, uses the manual pyr_level value.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:51:29 +01:00
4e6f9eb896 Respect user's pyr_level setting at all resolutions
Previously the user's pyr_level was overridden for >=540p content.
Now the setting is always used, with the tooltip recommending values
per resolution instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:50:29 +01:00
ffde07a89a Add tooltips to all node inputs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:49:27 +01:00
db64fc195a Initial commit: ComfyUI BIM-VFI node for video frame interpolation
Wraps BiM-VFI (CVPR 2025) as a ComfyUI custom node for long video
frame interpolation with memory-safe sequential processing.

- LoadBIMVFIModel: checkpoint loader with auto-download from Google Drive
- BIMVFIInterpolate: 2x/4x/8x recursive interpolation with per-pair
  GPU processing, configurable VRAM management (all_on_gpu for high-VRAM
  setups), progress bar, and backwarp cache clearing
- Vendored inference-only architecture from KAIST-VICLab/BiM-VFI
- Auto-detection of CUDA version for cupy installation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:26:49 +01:00