diff --git a/README.md b/README.md index 1a41137..36d0ace 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ pip install -r requirements.txt `cupy` is needed for optical flow warping in BIM-VFI, SGM-VFI, and GIMM-VFI. EMA-VFI does **not** need cupy. -The node will attempt to auto-install the correct cupy package on first load. If that fails, you'll see a clear error message in ComfyUI with install instructions. To install manually: +If cupy is missing, the Load node will show an error in ComfyUI with your CUDA version and the exact install command. To install: 1. Find your CUDA version: ```bash diff --git a/__init__.py b/__init__.py index 857c956..671c42b 100644 --- a/__init__.py +++ b/__init__.py @@ -1,40 +1,3 @@ -import subprocess -import sys -import logging - -logger = logging.getLogger("Tween") - - -def _ensure_cupy(): - """Try to auto-install cupy if missing, matching the PyTorch CUDA version.""" - try: - import cupy # noqa: F401 - return - except ImportError: - pass - - try: - import torch - if not torch.cuda.is_available() or not hasattr(torch.version, "cuda") or torch.version.cuda is None: - logger.warning( - "[Tween] CUDA not available — cupy cannot be installed. " - "SGM-VFI and GIMM-VFI require CUDA." - ) - return - major = int(torch.version.cuda.split(".")[0]) - cupy_pkg = f"cupy-cuda{major}x" - logger.info(f"[Tween] Installing {cupy_pkg} (CUDA {torch.version.cuda})...") - subprocess.check_call([sys.executable, "-m", "pip", "install", cupy_pkg]) - except Exception as e: - logger.warning( - f"[Tween] Could not auto-install cupy: {e}\n" - f"[Tween] SGM-VFI and GIMM-VFI will not work without cupy. Install manually:\n" - f"[Tween] pip install cupy-cuda12x # replace 12 with your CUDA major version" - ) - - -_ensure_cupy() - from .nodes import ( LoadBIMVFIModel, BIMVFIInterpolate, BIMVFISegmentInterpolate, TweenConcatVideos, LoadEMAVFIModel, EMAVFIInterpolate, EMAVFISegmentInterpolate,