Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
0efdf411
Unverified
Commit
0efdf411
authored
Apr 10, 2025
by
xieofxie
Committed by
GitHub
Apr 10, 2025
Browse files
add onnxruntime-qnn & onnxruntime-cann (#11269)
Co-authored-by:
hualxie
<
hualxie@microsoft.com
>
parent
450dc48a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
src/diffusers/utils/import_utils.py
src/diffusers/utils/import_utils.py
+6
-4
No files found.
src/diffusers/utils/import_utils.py
View file @
0efdf411
...
...
@@ -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-
migraphx
"
,
"onnxruntime-openvino"
,
"o
rt_nightly_directml
"
,
"o
nnxruntime-qnn
"
,
"onnxruntime-rocm"
,
"onnxruntime-migraphx"
,
"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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment