Files
ltdrdata-ComfyUI-Impact-Pack/modules/impact/additional_dependencies.py
T
Dr.Lt.Data 6d438d8b5d removed: mmdet and legacy nodes
removed: disable.py, uninstall.py
fixed: ruff check
refactored
2025-07-08 00:15:16 +09:00

13 lines
424 B
Python

import sys
import subprocess
def ensure_onnx_package():
try:
import onnxruntime # noqa: F401
except Exception:
if "python_embeded" in sys.executable or "python_embedded" in sys.executable:
subprocess.check_call([sys.executable, '-s', '-m', 'pip', 'install', 'onnxruntime'])
else:
subprocess.check_call([sys.executable, '-s', '-m', 'pip', 'install', 'onnxruntime'])