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

I have problem installing onnx #527

Open
6 tasks
Surya-733 opened this issue Aug 24, 2024 · 12 comments
Open
6 tasks

I have problem installing onnx #527

Surya-733 opened this issue Aug 24, 2024 · 12 comments
Assignees
Labels
can't reproduce The maintainer could not reproduce this issue. onnx About ONNX

Comments

@Surya-733
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

im tryng to use olive and found this
#149
but i got error

Steps to reproduce the problem

follow instruction
#149

What should have happened?

succes to install onnx

What browsers do you use to access the UI ?

No response

Sysinfo

sysinfo-2024-08-24-19-36.json

Console logs

venv "C:\AI 2\stable-diffusion-webui-amdgpu\venv\Scripts\Python.exe"
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.10.1-amd-2-g395ce8dc
Commit hash: 395ce8dc2cb01282d48074a89a5e6cb3da4b59ab
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
C:\AI 2\stable-diffusion-webui-amdgpu\venv\lib\site-packages\pytorch_lightning\utilities\distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead.
  rank_zero_deprecation(
Launching Web UI with arguments: --use-directml --lowvram --opt-sub-quad-attention --opt-split-attention --no-half-vae --upcast-sampling
DirectML initialization failed: No module named 'torch_directml'
Traceback (most recent call last):
  File "C:\AI 2\stable-diffusion-webui-amdgpu\launch.py", line 48, in <module>
    main()
  File "C:\AI 2\stable-diffusion-webui-amdgpu\launch.py", line 44, in main
    start()
  File "C:\AI 2\stable-diffusion-webui-amdgpu\modules\launch_utils.py", line 686, in start
    import webui
  File "C:\AI 2\stable-diffusion-webui-amdgpu\webui.py", line 13, in <module>
    initialize.imports()
  File "C:\AI 2\stable-diffusion-webui-amdgpu\modules\initialize.py", line 36, in imports
    shared_init.initialize()
  File "C:\AI 2\stable-diffusion-webui-amdgpu\modules\shared_init.py", line 30, in initialize
    directml_do_hijack()
  File "C:\AI 2\stable-diffusion-webui-amdgpu\modules\dml\__init__.py", line 76, in directml_do_hijack
    if not torch.dml.has_float64_support(device):
  File "C:\AI 2\stable-diffusion-webui-amdgpu\venv\lib\site-packages\torch\__init__.py", line 2003, in __getattr__
    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
AttributeError: module 'torch' has no attribute 'dml'
Press any key to continue . . .

Additional information

No response

@bigwinboy
Copy link

If your ultimate goal is just to install and use SD for AMD GPU, and your graphics card supports Zluda or directML, then you can add the command --skip-opt to skip the ONNX installation before installing, which will solve the problem, and if it's a project that requires ONNX, I've encountered such a problem but can't solve it!

@Surya-733
Copy link
Author

If your ultimate goal is just to install and use SD for AMD GPU, and your graphics card supports Zluda or directML, then you can add the command --skip-opt to skip the ONNX installation before installing, which will solve the problem, and if it's a project that requires ONNX, I've encountered such a problem but can't solve it!

aww man i want to try olive optimization, i was succesfully install SD and make images, but then i see someone in youtube use similiar cpu amd 8600g using igpu produce an image in tens of second using olive so i want to try it

thanks for responding and inform me, i will make this post stay until someone literally say its imposible

@lshqqytiger
Copy link
Owner

Wipe venv folder and try again. The installation does not seem to be done successfully.

@Surya-733
Copy link
Author

Surya-733 commented Aug 25, 2024

Wipe venv folder and try again. The installation does not seem to be done successfully.

the installation is working! i got everything sets up until the settings

but now i got error when i try to generate image in txt2img
"TypeError: LatentDiffusion.forward() missing 2 required positional arguments: 'x' and 'c'"
and when i use other model i got
"TypeError: 'OnnxRawPipeline' object is not callable"
do i need specific models or do something with them?

in case the console log is needed
first error https://pastebin.com/0Xu58ccK
second error https://pastebin.com/pTRd3Mvt

@lshqqytiger
Copy link
Owner

  • LatentDiffusion.forward()
    You should restart webui after enabling/disabling ONNX.

  • load_checkpoint_and_dispatch() got an unexpected keyword argument 'force_hooks'
    I can't reproduce. Maybe we have different version of packages.
    Anyway, I found another dependency issue on optimization process.
    Please try again after wiping venv one more time with new commits.

@lshqqytiger lshqqytiger self-assigned this Aug 26, 2024
@lshqqytiger lshqqytiger added onnx About ONNX can't reproduce The maintainer could not reproduce this issue. labels Aug 26, 2024
@Surya-733
Copy link
Author

  • LatentDiffusion.forward()
    You should restart webui after enabling/disabling ONNX.
  • load_checkpoint_and_dispatch() got an unexpected keyword argument 'force_hooks'
    I can't reproduce. Maybe we have different version of packages.
    Anyway, I found another dependency issue on optimization process.
    Please try again after wiping venv one more time with new commits.

i got same error as the first now, i was do git pull and then open the webui-user and got "AttributeError: module 'torch' has no attribute 'dml' "
i did try delete venv and try again few times but still got same error

this is the console log https://pastebin.com/yqQVm0QY

@lshqqytiger
Copy link
Owner

Maybe --use-cpu-torch is causing issue. Try again without that. (wipe venv)

@Surya-733
Copy link
Author

Maybe --use-cpu-torch is causing issue. Try again without that. (wipe venv)

it did boot the SD but still got the 'TypeError: 'OnnxRawPipeline' object is not callable'
https://pastebin.com/bDhRkRVN
and btw im sorry for the error mess and thanks

@lshqqytiger
Copy link
Owner

lshqqytiger commented Aug 26, 2024

Go to settings and change Diffusers pipeline to a proper one.
You are trying to load SD1.5 model using XL pipeline.

@Surya-733
Copy link
Author

Surya-733 commented Aug 26, 2024

Screenshot (8)
i think i did use the correct one?

do you think re-installing would help in any way?

@Ming2k8-Coder
Copy link

Ming2k8-Coder commented Sep 3, 2024 via email

@Surya-733
Copy link
Author

[image: image.png] you should check the onnx runtime instead Vào Th 3, 27 thg 8, 2024 vào lúc 03:55 Surya-733 @.***> đã viết:

Screenshot.8.png (view on web) https://github.com/user-attachments/assets/523cfdd4-6c94-4d55-abde-32857fc08e11 i think i did use the correct one? — Reply to this email directly, view it on GitHub <#527 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A7VS7K5H56K3QQLO3BEHRCDZTOI45AVCNFSM6AAAAABNB3EZB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJRGA3TQMRVGU . You are receiving this because you are subscribed to this thread.Message ID: </issues/527/2311078255@ github.com>

i did

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't reproduce The maintainer could not reproduce this issue. onnx About ONNX
Projects
None yet
Development

No branches or pull requests

4 participants