easydiffusion / easydiffusion

Easiest 1-click way to create beautiful artwork on your PC using AI, with no tech knowledge. Provides a browser UI for generating images from text prompts and images. Just enter your text prompt, and see the generated image.
https://easydiffusion.github.io/
Other
9.48k stars 781 forks source link

Unable to load models files/Qt plugin error. #961

Open kdmyers opened 1 year ago

kdmyers commented 1 year ago

Describe the bug Following the most recent update the program throws the following errors:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home//StableDiffusion/stable-diffusion-ui/installer_files/env/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.

/usr/bin/xdg-open: line 613: 145063 Aborted (core dumped) kde-open${KDE_SESSION_VERSION} "$1" DiffusionWrapper has 859.52 M params. making attention of type 'vanilla' with 512 in_channels Working with z of shape (1, 4, 32, 32) = 4096 dimensions. making attention of type 'vanilla' with 512 in_channels 07:29:08.531 INFO cuda:0 Created a temporary directory at /tmp/tmpxg2cey5c instantiator.py:21 07:29:08.533 INFO cuda:0 Writing /tmp/tmpxg2cey5c/_remote_module_non_scriptable.py instantiator.py:76 07:29:11.056 ERROR cuda:0 Error while loading stable-diffusion model: /home//StableDiffusion/stable-diffusion-ui/models/stable-diffusion/sd-v1-4.ckpt model_manager.py:45 07:29:11.057 ERROR cuda:0 Error: Unable to load weights from pytorch checkpoint file for model_manager.py:46 '/home//.cache/huggingface/hub/models--openai--clip-vit-large-patch14/snapshots/8d052a0f05efbaefbc9e8786ba291cfdf93e5bff/pytorch_model.bin' at
'/home//.cache/huggingface/hub/models--openai--clip-vit-large-patch14/snapshots/8d052a0f05efbaefbc9e8786ba291cfdf93e5bff/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please
set from_tf=True.
07:29:11.057 ERROR cuda:0 Consider removing the model from the model folder.

To Reproduce Steps to reproduce the behavior:

  1. run start.sh
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Re-installed with same error.

JeLuF commented 1 year ago

Please disable the browser startup in the config settings: https://github.com/cmdr2/stable-diffusion-ui/wiki/Config-settings#prevent-browser-start

Then open http://localhost:9000/ in a browser of your choice once the server startup is completed.

kdmyers commented 1 year ago

That removes to Qt error, but the model still does not load:

14:58:52.438 INFO cuda:0 Created a temporary directory at /tmp/tmppxvmsf93 instantiator.py:21 14:58:52.438 INFO cuda:0 Writing /tmp/tmppxvmsf93/_remote_module_non_sriptable.py instantiator.py:76 14:58:56.748 ERROR cuda:0 Error while loading stable-diffusion model: /home//Downloads/Install/stable-diffusion-ui/models/stable-diffusion/sd-v1-4.ckpt model_manager.py:45 14:58:56.749 ERROR cuda:0 Error: Unable to load weights from pytorch checkpoint file for model_manager.py:46 '/home//.cache/huggingface/hub/models--openai--clip-vit-large-patch14/snapshots/8d052a0f05efbaefbc9e8786ba291cfdf93e5bff/pytorch_model.bin' at
'/home//.cache/huggingface/hub/models--openai--clip-vit-large-patch14/snapshots/8d052a0f05efbaefbc9e8786ba291cfdf93e5bff/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please
set from_tf=True.
14:58:56.749 ERROR cuda:0 Consider removing the model from the model folder. model_manager.py:47 14:59:35.130 INFO cuda:0 Session 1678046370941 starting task 140149989808256

Tested other models but still get errors:

Error: Unable to load weights from pytorch checkpoint file for '/home//.cache/huggingface/hub/models--openai--clip-vit-large-patch14/snapshots/8d052a0f05efbaefbc9e8786ba291cfdf93e5bff/pytorch_model.bin' at '/home//.cache/huggingface/hub/models--openai--clip-vit-large-patch14/snapshots/8d052a0f05efbaefbc9e8786ba291cfdf93e5bff/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.

16bit-prntz commented 1 year ago

I got the same error as op. I did have stable diffusion working previously but recently reinstalled my Manjaro since I thought I screwed up drivers.

One-click installs the same error as OP on a fresh OS copy. This is my laptop so it has the intel hybrid graphics card and an Nvidia card in the same box. Curiously "About this System" Qt version: 5.15.8 Kernel-Version: 6.1.12-1Manjaro (64-bit)

EDIT: sudo ./start.sh should fix the XCB thing.. still having an issue getting the complete server running again but sudo the script.

ThisNekoGuy commented 1 year ago

Please disable the browser startup in the config settings: https://github.com/cmdr2/stable-diffusion-ui/wiki/Config-settings#prevent-browser-start

This wasn't even needed on KDE desktops until some time ago; it used to "just work" with opening a web browser tab for localhost:9000 over here.