1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

add onnxruntime-qnn & onnxruntime-cann (#11269)

Co-authored-by: hualxie <hualxie@microsoft.com>
This commit is contained in:
xieofxie
2025-04-10 13:00:23 +08:00
committed by GitHub
parent 450dc48a2c
commit 0efdf411fb

View File

@@ -101,18 +101,20 @@ _onnx_available = importlib.util.find_spec("onnxruntime") is not None
if _onnx_available:
candidates = (
"onnxruntime",
"onnxruntime-cann",
"onnxruntime-directml",
"ort_nightly_directml",
"onnxruntime-gpu",
"ort_nightly_gpu",
"onnxruntime-directml",
"onnxruntime-openvino",
"ort_nightly_directml",
"onnxruntime-rocm",
"onnxruntime-migraphx",
"onnxruntime-openvino",
"onnxruntime-qnn",
"onnxruntime-rocm",
"onnxruntime-training",
"onnxruntime-vitisai",
)
_onnxruntime_version = None
# For the metadata, we have to look for both onnxruntime and onnxruntime-gpu
# For the metadata, we have to look for both onnxruntime and onnxruntime-x
for pkg in candidates:
try:
_onnxruntime_version = importlib_metadata.version(pkg)