sd-webui-controlnet icon indicating copy to clipboard operation
sd-webui-controlnet copied to clipboard

[Bug]: onnxruntime-gpu unavailable on ARM

Open cbrl opened this issue 9 months ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

What happened?

The project attempts to install onnxruntime-gpu if CUDA is available, but this package is not available on ARM targets.

https://github.com/Mikubill/sd-webui-controlnet/blob/b30f0ac4a1ab20c6ba89ee20ce1cff6eb4f07412/install.py#L73

Steps to reproduce the problem

  1. Run the extension on a CUDA-enabled ARM platform without a manually compiled instance of the ONNX runtime Python module.

What should have happened?

The extension should fall back to installing the CPU runtime on non-x86 platforms.

Commit where the problem happens

webui: Any controlnet: Starting from f6bc98addd29f72c8cba336785ba822a57b63296

What browsers do you use to access the UI ?

No response

Command Line Arguments

--listen --api --enable-insecure-extension-access

List of enabled extensions

Built-in:

  • LDSR
  • Lora
  • ScuNET
  • SwinIR
  • canvas-zoom-and-pan
  • extra-options-section
  • hypertile
  • mobile
  • prompt-bracket-checker
  • stable-diffusion-webui-tensorrt

Third-party:

  • sd-civitai-browser-plus
  • sd-webui-controlnet
  • stable-diffusion-webui-rembg

Console logs

Error running install.py for extension /data/models/stable-diffusion/extensions/sd-webui-controlnet.
*** Command: "/usr/bin/python3" "/data/models/stable-diffusion/extensions/sd-webui-controlnet/install.py"
*** Error code: 1
*** stdout: Installing sd-webui-controlnet requirement: fvcore
*** Installing sd-webui-controlnet requirement: mediapipe
*** Installing sd-webui-controlnet requirement: svglib
*** Installing sd-webui-controlnet requirement: changing albumentations version from None to 1.4.3
*** Installing sd-webui-controlnet requirement: onnxruntime-gpu
*** 
*** stderr: Traceback (most recent call last):
***   File "/data/models/stable-diffusion/extensions/sd-webui-controlnet/install.py", line 150, in <module>
***     install_onnxruntime()
***   File "/data/models/stable-diffusion/extensions/sd-webui-controlnet/install.py", line 74, in install_onnxruntime
***     launch.run_pip(
***   File "/opt/stable-diffusion-webui/modules/launch_utils.py", line 144, in run_pip
***     return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
***   File "/opt/stable-diffusion-webui/modules/launch_utils.py", line 116, in run
***     raise RuntimeError("\n".join(error_bits))
*** RuntimeError: Couldn't install sd-webui-controlnet requirement: onnxruntime-gpu.
*** Command: "/usr/bin/python3" -m pip install onnxruntime-gpu --prefer-binary
*** Error code: 1
*** stderr: ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu (from versions: none)
*** ERROR: No matching distribution found for onnxruntime-gpu

Additional information

No response

cbrl avatar May 10 '24 18:05 cbrl