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

[Bug]: Blip checksum does not match

Open kadattack opened this issue 3 years ago • 3 comments

Is there an existing issue for this?

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

What happened?

When I tried going for the first time under Train > Preprocess images, selected Use BLIP for caption and then pressing Preprocess it attempted to download the 890Mb model from https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_base_caption_capfilt_large.pth and after finishing the download it throws an error

Error completing request
Arguments: ('/home/User/stable-diffusion-webui/HyperImages/', '/home/User/stable-diffusion-webui/HyperImages/processed/', 512, 896, 'ignore', False, False, True, False, 0.5, 0.2, False, 0.9, 0.15, 0.5, False) {}
Traceback (most recent call last):
  File "/home/User/stable-diffusion-webui/modules/ui.py", line 185, in f
    res = list(func(*args, **kwargs))
  File "/home/User/stable-diffusion-webui/webui.py", line 57, in f
    res = func(*args, **kwargs)
  File "/home/User/stable-diffusion-webui/modules/textual_inversion/ui.py", line 19, in preprocess
    modules.textual_inversion.preprocess.preprocess(*args)
  File "/home/User/stable-diffusion-webui/modules/textual_inversion/preprocess.py", line 18, in preprocess
    shared.interrogator.load()
  File "/home/User/stable-diffusion-webui/modules/interrogate.py", line 77, in load
    self.clip_model, self.clip_preprocess = self.load_clip_model()
  File "/home/User/stable-diffusion-webui/modules/interrogate.py", line 61, in load_clip_model
    model, preprocess = clip.load(clip_model_name, download_root=shared.cmd_opts.clip_models_path)
  File "/home/User/stable-diffusion-webui/venv/lib/python3.10/site-packages/clip/clip.py", line 120, in load
    model_path = _download(_MODELS[name], download_root or os.path.expanduser("~/.cache/clip"))
  File "/home/User/stable-diffusion-webui/venv/lib/python3.10/site-packages/clip/clip.py", line 70, in _download
    raise RuntimeError("Model has been downloaded but the SHA256 checksum does not not match")
RuntimeError: Model has been downloaded but the SHA256 checksum does not not match

Steps to reproduce the problem

  1. Go to Train tab
  2. Go to Preprocess images sub-tab
  3. Fill out Source directory and Destination directory fields
  4. Press Use BLIP for caption
  5. Press Preprocess

What should have happened?

Presumably it should generate tokens for the images.

Commit where the problem happens

828438b4a190759807f9054932cae3a8b880ddf1

What platforms do you use to access UI ?

Linux

What browsers do you use to access the UI ?

Brave

Command Line Arguments

--medvram

Additional information, context and logs

No response

kadattack avatar Nov 24 '22 16:11 kadattack

I have the same problem still as well as of January 14, 2023.

kasukanra avatar Jan 14 '23 03:01 kasukanra

Same issue 2/3/2023. Downloaded file 855mb, checksum fails loading checkpoint for 890mb file after 30 minutes or longer. Deleting and redownloading model results in same error.

"Downloading: "https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_base_caption_capfilt_large.pth" to E:\stable-diffusion\stable-diffusion-webui\models\BLIP\model_base_caption_capfilt_large.pth

100%|███████████████████████████████████████████████████████████████████████████████| 855M/855M [00:16<00:00, 54.8MB/s] load checkpoint from E:\stable-diffusion\stable-diffusion-webui\models\BLIP\model_base_caption_capfilt_large.pth 90%|██████████████████████████████████▏ | 799M/890M [1:02:50<07:05, 222kiB/s] Error completing request Arguments: ('task(qp6n3drbp87rr94)', 'E:\TrainingSamples', 'E:\TrainingSamples\Processed', 512, 512, 'ignore', False, False, True, False, 0.5, 0.2, False, 0.9, 0.15, 0.5, False, False, 384, 768, 4096, 409600, 'Maximize area', 0.1) {} Traceback (most recent call last): File "E:\stable-diffusion\stable-diffusion-webui\modules\call_queue.py", line 56, in f res = list(func(*args, **kwargs)) File "E:\stable-diffusion\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(*args, **kwargs) File "E:\stable-diffusion\stable-diffusion-webui\modules\textual_inversion\ui.py", line 19, in preprocess modules.textual_inversion.preprocess.preprocess(*args) File "E:\stable-diffusion\stable-diffusion-webui\modules\textual_inversion\preprocess.py", line 17, in preprocess shared.interrogator.load() File "E:\stable-diffusion\stable-diffusion-webui\modules\interrogate.py", line 130, in load self.clip_model, self.clip_preprocess = self.load_clip_model() File "E:\stable-diffusion\stable-diffusion-webui\modules\interrogate.py", line 114, in load_clip_model model, preprocess = clip.load(clip_model_name, download_root=shared.cmd_opts.clip_models_path) File "E:\stable-diffusion\stable-diffusion-webui\venv\lib\site-packages\clip\clip.py", line 120, in load model_path = _download(_MODELS[name], download_root or os.path.expanduser("~/.cache/clip")) File "E:\stable-diffusion\stable-diffusion-webui\venv\lib\site-packages\clip\clip.py", line 70, in _download raise RuntimeError("Model has been downloaded but the SHA256 checksum does not not match") RuntimeError: Model has been downloaded but the SHA256 checksum does not not match"

Jewbby avatar Feb 03 '23 21:02 Jewbby

It's indeed a chechsum mismatch, but the problem file is not model_base_caption_capfilt_large.pth, but ViT-L-14.pt, located in C:\Users\yourusername\.cache\clip. As you can see you didn't download completely (799M/890M). The solution is to download manually. You can find the download URL at E:\stable-diffusion\stable-diffusion-webui\venv\lib\site-packages\clip\clip.py, by searching "ViT-L-14.pt". The "b8cca3fd41ae0c99ba7e8951adf17d267cdb84cd88be6f7c2e0eca1737a03836" in the URL is the expected SHA256. Finally, replace the existing wrong file.

InstantHotCocoa avatar Feb 13 '23 23:02 InstantHotCocoa

That's not really a solution, but a workaround. Ideally, the ui would wait for the whole file to download. I'm running into the same problem on ubuntu, and I suspect it's because of my slow internet connection.

jaded0 avatar Jun 05 '23 07:06 jaded0

I'm on ubuntu, where's the directory for me to put the file?

jaded0 avatar Jun 05 '23 07:06 jaded0