stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

File is corrupted?

Open Astral0108 opened this issue 2 years ago • 13 comments

Describe the bug Web UI is not able to install.

To Reproduce Cloned stable-diffusion-webui with git. Downloaded models and installed python. Manually added Python path to webui-user.bat. When I attempted to run webui-user.bat, it gave this error. It is a nested error so I have no idea what actually went wrong.

Expected behavior Should have generated a local LAN address for the model that I could enter into my browser to generate Web UI.

Error Message Error verifying pickled file from C:\Users\Kaoru/.cache\huggingface\transformers\c506559a5367a918bab46c39c79af91ab88846b49c8abd9d09e699ae067505c6.6365d436cc844f2f2b4885629b559d8ff0938ac484c01a6796538b2665de96c7: Traceback (most recent call last): File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\modules\safe.py", line 76, in check_pt with zipfile.ZipFile(filename) as z: File "C:\Users\Kaoru\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1267, in init self._RealGetContents() File "C:\Users\Kaoru\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\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\modules\safe.py", line 97, in load check_pt(filename) File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\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\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\launch.py", line 169, in start_webui() File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\launch.py", line 164, in start_webui webui.webui() File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\webui.py", line 92, in webui initialize() File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\webui.py", line 85, in initialize shared.sd_model = modules.sd_models.load_model() File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\modules\sd_models.py", line 184, in load_model sd_model = instantiate_from_config(sd_config.model) File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\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\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 461, in init self.instantiate_cond_stage(cond_stage_config) File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 519, in instantiate_cond_stage model = instantiate_from_config(config) File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\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\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\repositories\stable-diffusion\ldm\modules\encoders\modules.py", line 142, in init self.transformer = CLIPTextModel.from_pretrained(version) File "C:\Users\Kaoru\Documents\Stable-Diffusion\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' Press any key to continue . . .

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Commit revision 989a552de3d1fcd1f178fe873713b884e192dd61

Additional context Other users have followed the exact same steps as me and have gotten it to work, so I don't know what the problem is here.

Astral0108 avatar Oct 14 '22 19:10 Astral0108

Having the same problem here

mashonoid avatar Oct 15 '22 07:10 mashonoid

Same problem here

WeaselOnaStick avatar Oct 15 '22 14:10 WeaselOnaStick

Maybe you should change another .ckpt model file.The program run properly,but when I change another model file, it occurs the same problem.

seasnakes avatar Oct 17 '22 11:10 seasnakes

Maybe you should change another .ckpt model file.The program run properly,but when I change another model file, it occurs the same problem.

Which model are you using? I have tried 3 separate models and gotten the same issue.

Astral0108 avatar Oct 18 '22 15:10 Astral0108

Looking back through my own errors, I saw this:

Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loading weights [45dee52b] from G:\Program Files\stable-diffusion-webui\models\Stable-diffusion\model.ckpt
Global Step: 487750
Applying cross attention optimization (Doggettx).
Model loaded.

Error verifying pickled file from G:\Program Files\stable-diffusion-webui\embeddings\Place Textual Inversion embeddings here.txt:

Traceback (most recent call last):
  File "G:\Program Files\stable-diffusion-webui\modules\safe.py", line 76, in check_pt with zipfile.ZipFile(filename) as z:
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1267, in __init__self._RealGetContents()
  File "C:\Users\Anthony\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

I went into the embeddings folder, deleted "Place Textual Inversion embeddings here.txt" closed the CMD window and reopened it and.......it ran smooth.

Kill the text file.

DoughyInTheMiddle avatar Oct 18 '22 18:10 DoughyInTheMiddle

This looks like the same issue as #2753. And this should resolve this.

tianbai avatar Oct 19 '22 04:10 tianbai

Looking back through my own errors, I saw this:

Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loading weights [45dee52b] from G:\Program Files\stable-diffusion-webui\models\Stable-diffusion\model.ckpt
Global Step: 487750
Applying cross attention optimization (Doggettx).
Model loaded.

Error verifying pickled file from G:\Program Files\stable-diffusion-webui\embeddings\Place Textual Inversion embeddings here.txt:

Traceback (most recent call last):
  File "G:\Program Files\stable-diffusion-webui\modules\safe.py", line 76, in check_pt with zipfile.ZipFile(filename) as z:
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1267, in __init__self._RealGetContents()
  File "C:\Users\Anthony\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

I went into the embeddings folder, deleted "Place Textual Inversion embeddings here.txt" closed the CMD window and reopened it and.......it ran smooth.

Kill the text file.

I did that and got the same error.

This looks like the same issue as #2753. And this should resolve this.

Thanks for the link- however, I do not see any linked file where you mentioned it.

Astral0108 avatar Oct 19 '22 19:10 Astral0108

I have tried all of these fixes, and have tried reinstalling it. I still get the same error

Ihateyoudattebayo avatar Oct 25 '22 20:10 Ihateyoudattebayo

Looking back through my own errors, I saw this:

Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Loading weights [45dee52b] from G:\Program Files\stable-diffusion-webui\models\Stable-diffusion\model.ckpt
Global Step: 487750
Applying cross attention optimization (Doggettx).
Model loaded.

Error verifying pickled file from G:\Program Files\stable-diffusion-webui\embeddings\Place Textual Inversion embeddings here.txt:

Traceback (most recent call last):
  File "G:\Program Files\stable-diffusion-webui\modules\safe.py", line 76, in check_pt with zipfile.ZipFile(filename) as z:
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1267, in __init__self._RealGetContents()
  File "C:\Users\Anthony\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

I went into the embeddings folder, deleted "Place Textual Inversion embeddings here.txt" closed the CMD window and reopened it and.......it ran smooth. Kill the text file.

I did that and got the same error.

This looks like the same issue as #2753. And this should resolve this.

Thanks for the link- however, I do not see any linked file where you mentioned it.

Did you end up finding a fix to the issue?

Ihateyoudattebayo avatar Oct 30 '22 16:10 Ihateyoudattebayo

Describe the bug Web UI is not able to install.

To Reproduce Cloned stable-diffusion-webui with git. Downloaded models and installed python. Manually added Python path to webui-user.bat. When I attempted to run webui-user.bat, it gave this error. It is a nested error so I have no idea what actually went wrong.

Expected behavior Should have generated a local LAN address for the model that I could enter into my browser to generate Web UI.

Error Message Error verifying pickled file from C:\Users\Kaoru/.cache\huggingface\transformers\c506559a5367a918bab46c39c79af91ab88846b49c8abd9d09e699ae067505c6.6365d436cc844f2f2b4885629b559d8ff0938ac484c01a6796538b2665de96c7: Traceback (most recent call last): File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\modules\safe.py", line 76, in check_pt with zipfile.ZipFile(filename) as z: File "C:\Users\Kaoru\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1267, in init self._RealGetContents() File "C:\Users\Kaoru\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\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\modules\safe.py", line 97, in load check_pt(filename) File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\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\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\launch.py", line 169, in start_webui() File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\launch.py", line 164, in start_webui webui.webui() File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\webui.py", line 92, in webui initialize() File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\webui.py", line 85, in initialize shared.sd_model = modules.sd_models.load_model() File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\modules\sd_models.py", line 184, in load_model sd_model = instantiate_from_config(sd_config.model) File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\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\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 461, in init self.instantiate_cond_stage(cond_stage_config) File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 519, in instantiate_cond_stage model = instantiate_from_config(config) File "C:\Users\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\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\Kaoru\Documents\Stable-Diffusion\stable-diffusion-webui\repositories\stable-diffusion\ldm\modules\encoders\modules.py", line 142, in init self.transformer = CLIPTextModel.from_pretrained(version) File "C:\Users\Kaoru\Documents\Stable-Diffusion\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' Press any key to continue . . .

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Commit revision 989a552

Additional context Other users have followed the exact same steps as me and have gotten it to work, so I don't know what the problem is here.

I managed to fix the problem.

So, you need to delete the hugging face folder.

Then go on notepad and open the user ui bat file.

and turn it into this

set COMMANDLINE_ARGS=--disable-safe-unpickle

Ihateyoudattebayo avatar Oct 30 '22 21:10 Ihateyoudattebayo

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2235 this helped me solve

Ihateyoudattebayo avatar Oct 30 '22 21:10 Ihateyoudattebayo

@Ihateyoudattebayo where is the hugging face folder?

ajinkyabodke avatar Nov 07 '22 16:11 ajinkyabodke

@Ihateyoudattebayo where is the hugging face folder?

Check this guide https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2235

Ihateyoudattebayo avatar Nov 07 '22 20:11 Ihateyoudattebayo

Absolute Legend - Much Appreciated [Ihateyoudattebayo]

lyon-donkey avatar Dec 18 '22 18:12 lyon-donkey

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2569

mezotaken avatar Jan 13 '23 09:01 mezotaken

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2465#issuecomment-1463004551

standby avatar Mar 09 '23 23:03 standby