huggingface / huggingface/diffusers
Failed to import diffusers.pipelines.onnx_utils
- Vorherrschende Sprache
- Python
- Sterne
- 34.5k
- Forks
- 7.3k
- Ø Merge
- 3 T. 3 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### Describe the bug
Running error:
```
diffusers\utils\import_utils.py", line 922, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.pipelines.onnx_utils because of the following error (look up to see its traceback):
DLL load failed while importing onnxruntime_pybind11_state
```
It seems to be a bug , You can manually modify lines 30/31 of the file:onnx_utils.py
lib\site-packages\diffusers\pipelines\onnx_utils.py
```
if is_onnx_available():
import onnxruntime as ort
```
Change it to
```
if False:
import onnxruntime as ort
```
### Reproduction
lib\site-packages\diffusers\pipelines\onnx_utils.py
```
if is_onnx_available():
import onnxruntime as ort
```
Change it to
```
if False:
import onnxruntime as ort
```
### Logs
```shell
Running error:
diffusers\utils\import_utils.py", line 922, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.pipelines.onnx_utils because of the following error (look up to see its traceback):
DLL load failed while importing onnxruntime_pybind11_state
```
### System Info
diffusers-0.32.2
onnxruntime-gpu=1.21.0
### Who can help?
_No response_
Beitragsleitfaden
Rechercherichtung
Start by reproducing the import failure with diffusers-0.32.2 and onnxruntime-gpu=1.21.0, then inspect lib/site-packages/diffusers/pipelines/onnx_utils.py and the _get_module path in diffusers/utils/import_utils.py. Done means importing diffusers.pipelines.onnx_utils no longer raises the reported onnxruntime DLL-load error.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- machine-learning
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100