Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no onnxruntime for python 3.11 [information] #13

Closed
wyrde opened this issue May 9, 2023 · 2 comments
Closed

no onnxruntime for python 3.11 [information] #13

wyrde opened this issue May 9, 2023 · 2 comments

Comments

@wyrde
Copy link

wyrde commented May 9, 2023

Impact-Pack install fails due to requirement of onnxruntime which doesn't have a module for python 3.11. This results in the error:

ERROR: Could not find a version that satisfies the requirement onnxruntime (from versions: none)
ERROR: No matching distribution found for onnxruntime

python 3.11 is included in the latest nightly comfy portable release (see bottom) https://github.com/comfyanonymous/ComfyUI/releases

This is bound to be an issue because a) the latest versions of torch use python 3.11, and b) the people at onnx are slackers who haven't bothered updating in a year.

If you're like me, and upgraded comfyUI to use the latest torch and python, it definitely creates an issue. I won't go into details here on how I did it, but I have comfyui running with a conda env with python 3.11 and the updated packages.

How I solved it:

With the environment active:

conda install python=3.10.10
pip install onnxruntime
conda install python=3.11.3

This downgrades python. Installs onnx. upgrades python.

result: setup continues with the install and

references:

@wyrde
Copy link
Author

wyrde commented May 9, 2023

There was still a halt related to onnx

### Loading: ComfyUI-Impact-Pack (V2.2)
Traceback (most recent call last):
  File "D:\sd\comfyui\comfy\nodes.py", line 1272, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\sd\comfyui\comfy\custom_nodes\Impact-Pack\__init__.py", line 54, in <module>
    import legacy_nodes
  File "D:\sd\comfyui\comfy\custom_nodes\Impact-Pack\legacy_nodes.py", line 2, in <module>
    import impact_core as core
  File "D:\sd\comfyui\comfy\custom_nodes\Impact-Pack\impact_core.py", line 19, in <module>
    import onnx
  File "D:\sd\comfyui\comfy\custom_nodes\Impact-Pack\onnx.py", line 1, in <module>
    import onnxruntime
  File "C:\wsr\Anaconda3\envs\torch21\Lib\site-packages\onnxruntime\__init__.py", line 55, in <module>
    raise import_capi_exception
  File "C:\wsr\Anaconda3\envs\torch21\Lib\site-packages\onnxruntime\__init__.py", line 23, in <module>
    from onnxruntime.capi._pybind_state import (
  File "C:\wsr\Anaconda3\envs\torch21\Lib\site-packages\onnxruntime\capi\_pybind_state.py", line 33, in <module>
    from .onnxruntime_pybind11_state import *  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: DLL load failed while importing onnxruntime_pybind11_state: The specified module could not be found.

Cannot import D:\sd\comfyui\comfy\custom_nodes\Impact-Pack module for custom nodes: DLL load failed while importing onnxruntime_pybind11_state: The specified module could not be found.

commented out # import onnx in impact_core.py and the impact node loaded without further issue.

@ltdrdata
Copy link
Owner

I changed the dependency of onnx to ondemand, so that it will only attempt to install when using onnx-related features. If onnx does not support version 3.11 currently, I will display an error message if it cannot be installed.

@ltdrdata ltdrdata closed this as completed Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants