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

[Build] ModuleNotFoundError: No module named 'onnxruntime' #18966

Open
Katooaton opened this issue Dec 31, 2023 · 1 comment
Open

[Build] ModuleNotFoundError: No module named 'onnxruntime' #18966

Katooaton opened this issue Dec 31, 2023 · 1 comment
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider platform:windows issues related to the Windows platform

Comments

@Katooaton
Copy link

Katooaton commented Dec 31, 2023

Describe the issue

Im trying to run it... followed all instructions yet wont work

sorry if I dont put the right info into the issue log... I dont fully understand how to submit a proper one and would like some advice maybe also...

Urgency

No response

Target platform

Im on windows 10 trying to use stable diffusion

Build script

Installing collected packages: numpy, humanfriendly, coloredlogs, onnxruntime-gpu
  Attempting uninstall: numpy
    Found existing installation: numpy 1.23.5
    Uninstalling numpy-1.23.5:
      Successfully uninstalled numpy-1.23.5
ReActor preheating... Error: The 'onnxruntime-gpu' distribution was not found and is required by the application
Device: CUDA

        +---------------------------------+
        --- PLEASE, RESTART the Server! ---
        +---------------------------------+
Launching Web UI with arguments: --xformers
2023-12-31 02:43:01,844 - ControlNet - INFO - ControlNet v1.1.410
ControlNet preprocessor location: D:\aish\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-12-31 02:43:02,051 - ControlNet - INFO - ControlNet v1.1.410
*** Error loading script: console_log_patch.py
    Traceback (most recent call last):
      File "D:\aish\stable-diffusion-webui\venv\Lib\site-packages\insightface\__init__.py", line 8, in <module>
        import onnxruntime
    ModuleNotFoundError: No module named 'onnxruntime'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "D:\aish\stable-diffusion-webui\modules\scripts.py", line 382, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\aish\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module
        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:\aish\stable-diffusion-webui\extensions\sd-webui-reactor\scripts\console_log_patch.py", line 4, in <module>
        import insightface
      File "D:\aish\stable-diffusion-webui\venv\Lib\site-packages\insightface\__init__.py", line 10, in <module>
        raise ImportError(
    ImportError: Unable to import dependency onnxruntime.

Error / output

Error loading script: console_log_patch.py
    Traceback (most recent call last):
      File "D:\aish\stable-diffusion-webui\venv\Lib\site-packages\insightface\__init__.py", line 8, in <module>
        import onnxruntime
    ModuleNotFoundError: No module named 'onnxruntime'

Visual Studio Version

No response

GCC / Compiler Version

No response

@Katooaton Katooaton added the build build issues; typically submitted using template label Dec 31, 2023
@github-actions github-actions bot added ep:CUDA issues related to the CUDA execution provider platform:windows issues related to the Windows platform labels Dec 31, 2023
@justinchuby
Copy link
Contributor

Are you trying to build onnx runtime from source? If not, simply install the required packages (onnxruntime-gpu or onnxruntime) from pip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider platform:windows issues related to the Windows platform
Projects
None yet
Development

No branches or pull requests

2 participants