Commit Graph

6 Commits

Author SHA1 Message Date
Ethanfel 2d96d5aa5d fix: catch all exceptions when importing cupy, not just ImportError
An installed-but-broken cupy (e.g. incompatible with NumPy 2.5, which
removed the 'bool8' alias) raises a TypeError during its own import, not
an ImportError. The narrow `except ImportError` guard let that propagate
and crashed the entire node import chain.

Broaden the guard to `except Exception` in all three CUDA-kernel modules
so any import-time failure disables cupy and falls back to the
pure-PyTorch implementations.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 19:51:28 +02:00
Ethanfel 83e4b5dd98 perf: add torch.compile to PyTorch fallback kernels
Wraps _pytorch_softsplat and _pytorch_costvol with torch.compile
for ~6x speedup on ROCm/non-cupy setups. Falls back to eager
execution gracefully if compilation fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 10:13:30 +02:00
Ethanfel 2e98e453a4 Add pure-PyTorch fallback for BIM-VFI cost volume kernel
When cupy is unavailable, the costvol_func.forward() now falls back to a
pure-PyTorch implementation using unfold + dot product instead of raising
a RuntimeError. The CUDA/cupy kernel path is preserved unchanged for when
cupy is available. This allows BIM-VFI to run on systems without cupy
(including CPU-only setups), matching the pattern used for the softsplat
fallbacks in SGM-VFI and GIMM-VFI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 02:09:56 +02:00
Ethanfel 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
Ethanfel 471a299027 Fix: lazy import cupy to allow node loading without cupy installed
cupy was imported at module level, causing ComfyUI to fail loading
the node entirely if cupy wasn't installed yet. Now deferred to
first actual CUDA kernel call, with a clear error message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 18:35:11 +01:00
Ethanfel 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