CompVis / stable-diffusion

A latent text-to-image diffusion model
https://ommer-lab.com/research/latent-diffusion-models/
Other
67.74k stars 10.11k forks source link

Trouble Running webui-user.bat (Not working) #391

Open my69cutlass4dr opened 1 year ago

my69cutlass4dr commented 1 year ago

While setting up everything for Stable Diffusion. I opened the "webui-user.bat" and it failed to run. I have an AMD Radeon RX 580 so for the "COMMANDLINE_ARGS=", I used the COMMANDLINE_ARGS=--skip-torch-cuda-test in place of it. After reopening "webui-user.bat", it runs as follows: (NOTE: What should I do to fix this?)

venv "C:\Users\my69c\Documents\SDlocal\venv\Scripts\Python.exe" Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Commit hash: Installing requirements for Web UI Launching Web UI with arguments: Warning: caught exception 'Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx', memory monitor disabled LatentDiffusion: Running in eps-prediction mode 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 Error verifying pickled file from C:\Users\my69c/.cache\huggingface\transformers\c506559a5367a918bab46c39c79af91ab88846b49c8abd9d09e699ae067505c6.6365d436cc844f2f2b4885629b559d8ff0938ac484c01a6796538b2665de96c7: Traceback (most recent call last): File "C:\Users\my69c\Documents\SDlocal\modules\safe.py", line 76, in check_pt with zipfile.ZipFile(filename) as z: File "C:\Users\my69c\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1267, in init self._RealGetContents() File "C:\Users\my69c\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1334, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\my69c\Documents\SDlocal\modules\safe.py", line 97, in load check_pt(filename) File "C:\Users\my69c\Documents\SDlocal\modules\safe.py", line 89, in check_pt unpickler.load() _pickle.UnpicklingError: persistent IDs in protocol 0 must be ASCII strings

-----> !!!! The file is most likely corrupted !!!! <----- You can skip this check with --disable-safe-unpickle commandline argument, but that is not going to help you.

Traceback (most recent call last): File "C:\Users\my69c\Documents\SDlocal\launch.py", line 181, in start_webui() File "C:\Users\my69c\Documents\SDlocal\launch.py", line 176, in start_webui webui.webui() File "C:\Users\my69c\Documents\SDlocal\webui.py", line 92, in webui initialize() File "C:\Users\my69c\Documents\SDlocal\webui.py", line 85, in initialize shared.sd_model = modules.sd_models.load_model() File "C:\Users\my69c\Documents\SDlocal\modules\sd_models.py", line 189, in load_model sd_model = instantiate_from_config(sd_config.model) File "C:\Users\my69c\Documents\SDlocal\repositories\stable-diffusion\ldm\util.py", line 85, in instantiate_from_config return get_obj_from_str(config["target"])(config.get("params", dict())) File "C:\Users\my69c\Documents\SDlocal\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 461, in init self.instantiate_cond_stage(cond_stage_config) File "C:\Users\my69c\Documents\SDlocal\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 519, in instantiate_cond_stage model = instantiate_from_config(config) File "C:\Users\my69c\Documents\SDlocal\repositories\stable-diffusion\ldm\util.py", line 85, in instantiate_from_config return get_obj_from_str(config["target"])(config.get("params", dict())) File "C:\Users\my69c\Documents\SDlocal\repositories\stable-diffusion\ldm\modules\encoders\modules.py", line 142, in init self.transformer = CLIPTextModel.from_pretrained(version) File "C:\Users\my69c\Documents\SDlocal\venv\lib\site-packages\transformers\modeling_utils.py", line 2006, in from_pretrained loaded_state_dict_keys = [k for k in state_dict.keys()] AttributeError: 'NoneType' object has no attribute 'keys' Press any key to continue . . .

timbgray commented 1 year ago

exact same problem. Windows 11 File "C:\Users\timbg\Documents\StableDiffusion\stable-diffusion-webui\venv\lib\site-packages\transformers\modeling_utils.py", line 2006, in from_pretrained loaded_state_dict_keys = [k for k in state_dict.keys()] AttributeError: 'NoneType' object has no attribute 'keys'

bad1313 commented 1 year ago

Did you try the option --disable-safe-unpickle ? Add this option to the commandline_args.

TangentGamingCEO commented 1 year ago

no Idea what that means. Same issue.

aleff-github commented 1 year ago

Try to solve like this https://github.com/CompVis/stable-diffusion/issues/432

timbgray commented 1 year ago

Started with a clean install of everything, this time with Python 3.10.6 rather than 3.10.8 and got it working. Not necessarily saying that the Python version was the issue, I could have (probably did) made another error on the initial install that I didn't make the second time, but it is working now.

TangentGamingCEO commented 1 year ago

Well thanks, I appreciate it. Ai is a passion for me and your help is just so beautiful. You have no idea my friend. Thank you for that. Thank you for everything if you are the creator or moderator for this free technology. I am a disabled veteran and I have ADHD that seems to become stronger with age. This technology has allowed me to create finished works of art and when I can get it working on my own computer I can be even more free and feel like I am imposing on others even less with my creations. If there is a support area on the website? I not a greedy man and I appreciate those who do for others. ❤️

Thanks brosis!

- Chuck D.

On Fri, Oct 28, 2022, 12:58 PM timbgray @.***> wrote:

Started with a clean install of everything, this time with Python 3.10.6 rather than 3.10.8 and got it working. Not necessarily saying that the Python version was the issue, I could have (probably did) made another error on the initial install that I didn't make the second time, but it is working now.

— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/391#issuecomment-1295236575, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3ZFQPD5LXOW7BZHMYFNJYDWFQA43ANCNFSM6AAAAAARGPFEEM . You are receiving this because you commented.Message ID: @.***>

SaFieQ commented 1 year ago

I do not start at all. I click 2 times on webui-user.bat and nothing happens, only some icon appears in the taskbar and immediately disappears