Files
ComfyUI-Tween/__init__.py
Ethanfel 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

48 lines
1.4 KiB
Python

import subprocess
import sys
import logging
logger = logging.getLogger("BIM-VFI")
def _auto_install_deps():
"""Auto-install missing dependencies on first load."""
# gdown
try:
import gdown # noqa: F401
except ImportError:
logger.info("[BIM-VFI] Installing gdown...")
subprocess.check_call([sys.executable, "-m", "pip", "install", "gdown"])
# cupy
try:
import cupy # noqa: F401
except ImportError:
try:
import torch
major = int(torch.version.cuda.split(".")[0])
cupy_pkg = f"cupy-cuda{major}x"
logger.info(f"[BIM-VFI] Installing {cupy_pkg} (CUDA {torch.version.cuda})...")
subprocess.check_call([sys.executable, "-m", "pip", "install", cupy_pkg])
except Exception as e:
logger.warning(f"[BIM-VFI] Could not auto-install cupy: {e}")
_auto_install_deps()
from .nodes import LoadBIMVFIModel, BIMVFIInterpolate, BIMVFISegmentInterpolate, BIMVFIConcatVideos
NODE_CLASS_MAPPINGS = {
"LoadBIMVFIModel": LoadBIMVFIModel,
"BIMVFIInterpolate": BIMVFIInterpolate,
"BIMVFISegmentInterpolate": BIMVFISegmentInterpolate,
"BIMVFIConcatVideos": BIMVFIConcatVideos,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"LoadBIMVFIModel": "Load BIM-VFI Model",
"BIMVFIInterpolate": "BIM-VFI Interpolate",
"BIMVFISegmentInterpolate": "BIM-VFI Segment Interpolate",
"BIMVFIConcatVideos": "BIM-VFI Concat Videos",
}