From 120f2ca1b1e226d7e3c23917647d78a6a3318b92 Mon Sep 17 00:00:00 2001 From: huchukato Date: Wed, 12 Aug 2026 11:52:53 +0200 Subject: [PATCH] Fix auto-install reliability and bump version to 1.2.0 - Verify tensorrt is actually importable before trusting the install marker; retry install if marker exists but import fails (likely cause of user reports where the node loaded but TensorRT did not work) - Add --no-input to pip install calls to avoid hanging on interactive prompts - Show pip stdout during auto-install so users can see progress - Improve failed-install cooldown message with retry instructions - Bump version to 1.2.0 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- __init__.py | 19 ++++++++++++++++--- install.py | 2 +- pyproject.toml | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/__init__.py b/__init__.py index c404606..c297524 100644 --- a/__init__.py +++ b/__init__.py @@ -95,9 +95,17 @@ def _auto_install_tensorrt(): installed_marker = node_dir / ".tensorrt_auto_installed" failed_marker = node_dir / ".tensorrt_auto_install_failed" - # Skip if we already installed successfully in a previous run. + # Skip if we already installed successfully in a previous run AND tensorrt is importable. if installed_marker.exists(): - return True + try: + import tensorrt + return True + except ImportError: + print("[ComfyUI-RIFE-TensorRT] Install marker exists but tensorrt is not importable; retrying.") + try: + installed_marker.unlink() + except Exception: + pass # Avoid retrying too often after a failure (do not block every startup). if failed_marker.exists(): @@ -105,6 +113,7 @@ def _auto_install_tensorrt(): last_fail = failed_marker.stat().st_mtime if time.time() - last_fail < 3600: print("[ComfyUI-RIFE-TensorRT] Recent failed install attempt; skipping auto-install.") + print("To retry now, delete the .tensorrt_auto_install_failed marker file or wait 1 hour.") return False except Exception: pass @@ -205,7 +214,7 @@ def _auto_install_tensorrt(): continue print(f"[ComfyUI-RIFE-TensorRT] Installing from {req_name}...") result = subprocess.run( - [sys.executable, "-m", "pip", "install", "--prefer-binary", "-r", str(req_file_path)], + [sys.executable, "-m", "pip", "install", "--no-input", "--prefer-binary", "-r", str(req_file_path)], capture_output=True ) if result.returncode != 0: @@ -213,6 +222,10 @@ def _auto_install_tensorrt(): print(result.stderr.decode(errors="replace")) failed_marker.touch() return False + # Show pip stdout so the user can see progress / warnings. + stdout = result.stdout.decode(errors="replace").strip() + if stdout: + print(stdout) installed_marker.touch() print("[ComfyUI-RIFE-TensorRT] TensorRT installation completed successfully!") diff --git a/install.py b/install.py index a5ca8aa..bf506ae 100755 --- a/install.py +++ b/install.py @@ -97,7 +97,7 @@ def install_requirements(cuda_version): continue print(f"Installing from {req_name}...") result = subprocess.run( - [sys.executable, "-m", "pip", "install", "--prefer-binary", "-r", str(req_file_path)] + [sys.executable, "-m", "pip", "install", "--no-input", "--prefer-binary", "-r", str(req_file_path)] ) if result.returncode != 0: print(f"Failed to install {req_name}") diff --git a/pyproject.toml b/pyproject.toml index 93500c0..c59c956 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "ComfyUI_RIFE_TensorRT_Auto" description = "Ultra fast frame interpolation using RIFE with TensorRT with Automatic downloading" -version = "1.1.1" +version = "1.2.0" license = { file = "LICENSE" } [project.urls]