nvcc detection via argv list, drop shell=True; bump 1.2.1

This commit is contained in:
huchukato
2026-09-25 03:52:12 +02:00
parent a2fdc99dde
commit b418aa783a
4 changed files with 755 additions and 751 deletions
+4
View File
@@ -1,5 +1,9 @@
# Update Log
## Version 1.2.1
- CUDA detection now invokes `nvcc --version` via argv lists instead of `shell=True` (registry `python_command_injection_risk` false positive; also general hardening).
## Version 1.2.0
- Fixed auto-install reliability: TensorRT engine build and dependency setup are more robust on fresh pods.
+745 -745
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -15,9 +15,9 @@ SCRIPT_DIR = Path(__file__).resolve().parent
def run_command(cmd):
"""Run a shell command and return stdout + return code."""
"""Run a command (argv list) and return stdout + return code."""
try:
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
result = subprocess.run(cmd, capture_output=True, text=True)
return result.stdout.strip(), result.returncode
except Exception as e:
return "", 1
@@ -28,7 +28,7 @@ def detect_cuda_version():
print("Detecting CUDA version...")
# Try nvcc command
stdout, returncode = run_command("nvcc --version")
stdout, returncode = run_command(["nvcc", "--version"])
if returncode == 0:
match = re.search(r"release (\d+\.\d+)", stdout)
if match:
@@ -41,7 +41,7 @@ def detect_cuda_version():
if cuda_path:
nvcc_path = os.path.join(cuda_path, "bin", "nvcc")
if os.path.exists(nvcc_path):
stdout, returncode = run_command(f'"{nvcc_path}" --version')
stdout, returncode = run_command([nvcc_path, "--version"])
if returncode == 0:
match = re.search(r"release (\d+\.\d+)", stdout)
if match:
@@ -54,7 +54,7 @@ def detect_cuda_version():
if cuda_home:
nvcc_path = os.path.join(cuda_home, "bin", "nvcc")
if os.path.exists(nvcc_path):
stdout, returncode = run_command(f'"{nvcc_path}" --version')
stdout, returncode = run_command([nvcc_path, "--version"])
if returncode == 0:
match = re.search(r"release (\d+\.\d+)", stdout)
if match:
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "Auto-TensorRT-RIFE"
description = "Ultra fast video frame interpolation for ComfyUI using RIFE with TensorRT acceleration. Auto-detects CUDA version, installs matching TensorRT wheels, and downloads RIFE models automatically."
version = "1.2.0"
version = "1.2.1"
license = { file = "LICENSE" }
[project.urls]