vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.53k stars 406 forks source link

[Issue]: Onnx initialize error #3430

Open ChiaYen-Kan opened 2 weeks ago

ChiaYen-Kan commented 2 weeks ago

Issue Description

after update to e7ec07f9783701629ca1411ad82aec87232501b9, every time start SD.Next is show a onnx initialize error

onnx-error

Version Platform Description

Platform: cpu: AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD (amd ryzen 5 5600g without other gpu) system: Windows release: Windows-10-10.0.19045-SP0 python: 3.11.9

Backend: directml

Version e7ec07f9783701629ca1411ad82aec87232501b9

Browser: Firefox 130

Relevant log output

Using VENV: C:\AI\automatic-pony\venv
11:19:24-456987 INFO     Starting SD.Next
11:19:24-456987 INFO     Logger: file="C:\AI\automatic-pony\sdnext.log" level=INFO size=72375 mode=append
11:19:24-456987 INFO     Python version=3.11.9 platform=Windows bin="C:\AI\automatic-pony\venv\Scripts\python.exe"
                         venv="C:\AI\automatic-pony\venv"
11:19:24-667848 INFO     Version: app=sd.next updated=2024-09-13 hash=e7ec07f9 branch=master
                         url=https://github.com/vladmandic/automatic.git/tree/master ui=main
11:19:25-513751 INFO     Platform: arch=AMD64 cpu=AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD system=Windows
                         release=Windows-10-10.0.19045-SP0 python=3.11.9
11:19:25-518753 INFO     HF cache folder: C:\Users\ChiaYen\.cache\huggingface\hub
11:19:25-526053 INFO     Using DirectML Backend
11:19:25-738740 INFO     Verifying requirements
11:19:25-743742 INFO     Verifying packages
11:19:25-787752 INFO     Extensions: disabled=['sdnext-modernui']
11:19:25-789752 INFO     Extensions: enabled=['Lora', 'sd-extension-chainner', 'sd-extension-system-info',
                         'sd-webui-agent-scheduler', 'stable-diffusion-webui-rembg'] extensions-builtin
11:19:25-794753 INFO     Extensions: enabled=['adetailer', 'ultimate-upscale-for-automatic1111'] extensions
11:19:25-797754 INFO     Startup: quick launch
11:19:25-799754 INFO     Extensions: disabled=['sdnext-modernui']
11:19:25-800756 INFO     Extensions: enabled=['Lora', 'sd-extension-chainner', 'sd-extension-system-info',
                         'sd-webui-agent-scheduler', 'stable-diffusion-webui-rembg'] extensions-builtin
11:19:25-805755 INFO     Extensions: enabled=['adetailer', 'ultimate-upscale-for-automatic1111'] extensions
11:19:25-812758 INFO     Command line args: ['--use-directml', '--models-dir', 'C:/AI/Models', '--lowvram']
                         lowvram=True models_dir=C:/AI/Models use_directml=True
11:19:33-730652 INFO     Load packages: {'torch': '2.3.1+cpu', 'diffusers': '0.31.0.dev0', 'gradio': '3.43.2'}
11:19:34-488199 INFO     Engine: backend=Backend.ORIGINAL compute=directml device=privateuseone:0
                         attention="Sub-quadratic" mode=no_grad
11:19:34-556870 INFO     Device: device=AMD Radeon(TM) Graphics n=1 directml=0.2.4.dev240815
11:19:36-174231 ERROR    ONNX failed to initialize: DLL load failed while importing onnx_cpp2py_export: 動態連結程式庫
                         (DLL) 初始化例行程序失敗。
11:19:38-131145 INFO     Using models path: C:/AI/Models
11:19:38-247041 INFO     Available VAEs: path="C:/AI/Models\VAE" items=10
11:19:38-262659 INFO     Disabled extensions: ['sdnext-modernui']
11:19:38-278284 INFO     Available models: path="C:/AI/Models\Stable-diffusion" items=45 time=0.02
11:19:38-463186 INFO     Extension: script='extensions-builtin\Lora\scripts\lora_script.py'
                         11:19:38-463186 INFO     LoRA networks: available=116
                         folders=2
11:19:38-952897 INFO     Extension: script='extensions-builtin\sd-webui-agent-scheduler\scripts\task_scheduler.py'
                         Using sqlite file: extensions-builtin\sd-webui-agent-scheduler\task_scheduler.sqlite3
11:19:39-856481 INFO     Extension: script='extensions\adetailer\scripts\!adetailer.py' [-] ADetailer initialized.
                         version: 24.8.0, num models: 25
11:19:39-905356 INFO     UI theme: type=Standard name="black-teal"
11:19:40-877865 INFO     Extension list is empty: refresh required
11:19:41-690043 INFO     Local URL: http://127.0.0.1:7860/
11:19:41-842204 INFO     [AgentScheduler] Task queue is empty
11:19:41-842204 INFO     [AgentScheduler] Registering APIs
11:19:42-196189 INFO     Torch override dtype: no-half set
11:19:42-196189 INFO     Torch override VAE dtype: no-half set
11:19:42-196189 INFO     Setting Torch parameters: device=privateuseone:0 dtype=torch.float32 vae=torch.float32
                         unet=torch.float32 context=no_grad fp16=True bf16=None optimization=Sub-quadratic
11:19:42-204207 INFO     Startup time: 16.39 torch=5.73 gradio=1.43 diffusers=0.24 libraries=4.88 samplers=0.12
                         extensions=1.48 face-restore=0.08 ui-networks=0.15 ui-txt2img=0.08 ui-img2img=0.09
                         ui-extras=0.31 ui-models=0.17 ui-settings=0.13 ui-extensions=0.69 launch=0.11 api=0.09
                         app-started=0.41

Backend

Original

UI

Standard

Branch

Master

Model

StableDiffusion 1.5

Acknowledgements

lshqqytiger commented 4 days ago

Try Windows update. Do you have Visual Studio or Visual C++ build tools?

ChiaYen-Kan commented 2 days ago

Try Windows update. Do you have Visual Studio or Visual C++ build tools?

  1. i don't install any visual studio tool
  2. windows 10 is update to 2024-8
  3. i try to remove venv folder, reinstall all package, but is also show onnx initialize error
  4. image generation is working(no use onnx)

update: https://github.com/onnx/onnx/issues/6267