daquanzhou
merge github repos and lfs track ckpt/path/safetensors/pt
613c9ab
raw
history blame
410 Bytes
import sys
import subprocess
def ensure_onnx_package():
try:
import onnxruntime
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'])