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>
This commit is contained in:
huchukato
2026-08-12 11:52:53 +02:00
co-authored by Devin
parent 9eefdbddfa
commit 120f2ca1b1
3 changed files with 18 additions and 5 deletions
+16 -3
View File
@@ -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!")
+1 -1
View File
@@ -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}")
+1 -1
View File
@@ -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]