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

[Bug]: Error verifying pickled file from C:\Users pytorch_model.bin

Open kevinzpk opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

Runing webui-user.bat Last time runing, has downloading pytorch_model for upgrating, but failed download. After restart webui, the Error exits.

Steps to reproduce the problem

  1. start webui
  2. After installing requirements
  3. Error report

What should have happened?

fail upgrate pytorch_model

Commit where the problem happens

webui-user.bat

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

gif2gif webui-ar webui-controlNet

Console logs

venv "D:\Develop\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing requirements for Web UI

Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
Loading weights [f75c520687] from D:\Develop\stable-diffusion-webui\models\Stable-diffusion\chilloutmixss20_v20.safetensors
Creating model from config: D:\Develop\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Error verifying pickled file from C:\Users\Admin/.cache\huggingface\hub\models--openai--clip-vit-large-patch14\snapshots\8d052a0f05efbaefbc9e8786ba291cfdf93e5bff\pytorch_model.bin:
Traceback (most recent call last):
  File "D:\Develop\stable-diffusion-webui\modules\safe.py", line 81, in check_pt
    with zipfile.ZipFile(filename) as z:
  File "E:\Python310\lib\zipfile.py", line 1267, in __init__
    self._RealGetContents()
  File "E:\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 "D:\Develop\stable-diffusion-webui\modules\safe.py", line 135, in load_with_extra
    check_pt(filename, extra_handler)
  File "D:\Develop\stable-diffusion-webui\modules\safe.py", line 102, 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.


Failed to create model quickly; will retry using slow method.
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Error verifying pickled file from C:\Users\Admin/.cache\huggingface\hub\models--openai--clip-vit-large-patch14\snapshots\8d052a0f05efbaefbc9e8786ba291cfdf93e5bff\pytorch_model.bin:
Traceback (most recent call last):
  File "D:\Develop\stable-diffusion-webui\modules\safe.py", line 81, in check_pt
    with zipfile.ZipFile(filename) as z:
  File "E:\Python310\lib\zipfile.py", line 1267, in __init__
    self._RealGetContents()
  File "E:\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 "D:\Develop\stable-diffusion-webui\modules\safe.py", line 135, in load_with_extra
    check_pt(filename, extra_handler)
  File "D:\Develop\stable-diffusion-webui\modules\safe.py", line 102, 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.


loading stable diffusion model: AttributeError
Traceback (most recent call last):
  File "D:\Develop\stable-diffusion-webui\webui.py", line 111, in initialize
    modules.sd_models.load_model()
  File "D:\Develop\stable-diffusion-webui\modules\sd_models.py", line 406, in load_model
    sd_model = instantiate_from_config(sd_config.model)
  File "D:\Develop\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\util.py", line 79, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "D:\Develop\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 563, in __init__
    self.instantiate_cond_stage(cond_stage_config)
  File "D:\Develop\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 630, in instantiate_cond_stage
    model = instantiate_from_config(config)
  File "D:\Develop\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\util.py", line 79, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "D:\Develop\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\encoders\modules.py", line 100, in __init__
    self.transformer = CLIPTextModel.from_pretrained(version)
  File "D:\Develop\stable-diffusion-webui\venv\lib\site-packages\transformers\modeling_utils.py", line 2258, in from_pretrained
    loaded_state_dict_keys = [k for k in state_dict.keys()]
AttributeError: 'NoneType' object has no attribute 'keys'


Stable diffusion model failed to load, exiting

Additional information

No response

kevinzpk avatar Mar 03 '23 16:03 kevinzpk

Last time runing, has downloading pytorch_model for upgrating, but failed download.

like you said - so now you have a partial model on disk and it fails to load. delete it so it can be downloaded again, hopefully correctly this time.

vladmandic avatar Mar 03 '23 17:03 vladmandic

i have the same issue. how do i delete the model i.e. which folder do i delete ?

Last time runing, has downloading pytorch_model for upgrating, but failed download.

like you said - so now you have a partial model on disk and it fails to load. delete it so it can be downloaded again, hopefully correctly this time.

Austino91 avatar Mar 03 '23 18:03 Austino91

it tells you in the console log itself

Error verifying pickled file from C:\Users\Admin/.cache\huggingface\hub\models--openai--clip-vit-large-patch14\snapshots\8d052a0f05efbaefbc9e8786ba291cfdf93e5bff\pytorch_model.bin:

vladmandic avatar Mar 03 '23 18:03 vladmandic

TKS advise. It works now!!!!

kevinzpk avatar Mar 03 '23 18:03 kevinzpk