diff --git a/goofer_video_concat.py b/goofer_video_concat.py index c64f1bf..b8f0f0f 100644 --- a/goofer_video_concat.py +++ b/goofer_video_concat.py @@ -387,10 +387,21 @@ def _upscale(images, target_resolution=1080, quality="ULTRA"): n_frames, result.shape[2], result.shape[1]) return result - except ImportError: - logger.info("torch-tensorrt not installed. Trying standard Real-ESRGAN...") + except ImportError as ie: + logger.warning( + "torch-tensorrt NOT INSTALLED — falling back to standard Real-ESRGAN. " + "To fix: pip install -r requirements-runpod.txt (import error: %s)", ie + ) + print( + "[VideoConcat] WARNING: torch-tensorrt not found! Using slow Real-ESRGAN fallback.\n" + "[VideoConcat] Fix: pip install -r requirements-runpod.txt" + ) except Exception as e: - logger.warning("TensorRT path failed: %s. Trying standard Real-ESRGAN...", e) + logger.warning( + "TensorRT path FAILED: %s — falling back to standard Real-ESRGAN. " + "Check CUDA version matches torch-tensorrt build (nvcc --version).", e + ) + print(f"[VideoConcat] WARNING: TensorRT failed: {e}. Using Real-ESRGAN fallback.") # --- Strategy 3: Real-ESRGAN via PyTorch CUDA (no TensorRT) --- try: diff --git a/requirements-runpod.txt b/requirements-runpod.txt new file mode 100644 index 0000000..d2dc934 --- /dev/null +++ b/requirements-runpod.txt @@ -0,0 +1,20 @@ +# ComfyUI-Goofer — RunPod / Linux NVIDIA TensorRT requirements +# Install AFTER base requirements.txt: +# pip install -r requirements.txt +# pip install -r requirements-runpod.txt +# +# CRITICAL: The --extra-index-url MUST match your CUDA toolkit. +# RunPod default (March 2026): CUDA 12.8 → cu128 +# Check yours: nvcc --version +# +# If you see "libcudart.so.13: cannot open shared object file" +# you installed the wrong CUDA build. Uninstall and reinstall +# with the correct index URL below. + +--extra-index-url https://download.pytorch.org/whl/cu128 + +# NVIDIA TensorRT — compiled for tensor cores (Blackwell, Ada, Hopper) +torch-tensorrt>=2.2.0 + +# Ensure torchaudio matches PyTorch CUDA build +torchaudio>=2.0.0 diff --git a/requirements.txt b/requirements.txt index 933cd22..0c42c6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,10 @@ opencv-python>=4.8.0 # Optional: denoise/frame prep (graceful fallback) # Upscaling — NVIDIA hardware chain realesrgan>=0.3.0 # Real-ESRGAN upscaler (auto-downloads ~64 MB model) basicsr>=1.4.2 # Required by Real-ESRGAN -torch-tensorrt>=2.2.0 # NVIDIA TensorRT acceleration (Linux/RunPod — uses tensor cores) +# NOTE: torch-tensorrt moved to requirements-runpod.txt +# It MUST match your CUDA toolkit version (cu128/cu130). +# Installing the wrong build causes libcudart.so errors. +# On RunPod/Linux: pip install -r requirements-runpod.txt # Prompt generation (Qwen2.5 mode) — models auto-download on first use transformers>=4.37.0 # Qwen2.5-Instruct + MusicGen