Errors with WebUi on colab

#3
by hydall - opened

Having an error with using embedding in WebUi on Colab. Pasting errors here.

Error verifying pickled file from /content/stable-diffusion-webui/embeddings/EasyNegative.safetensors:
Traceback (most recent call last):
File "/content/stable-diffusion-webui/modules/safe.py", line 81, in check_pt
with zipfile.ZipFile(filename) as z:
File "/usr/lib/python3.8/zipfile.py", line 1269, in init
self._RealGetContents()
File "/usr/lib/python3.8/zipfile.py", line 1336, 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 "/content/stable-diffusion-webui/modules/safe.py", line 135, in load_with_extra
check_pt(filename, extra_handler)
File "/content/stable-diffusion-webui/modules/safe.py", line 102, in check_pt
unpickler.load()
_pickle.UnpicklingError: invalid load key, '"'.

-----> !!!! 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.

Error loading embedding EasyNegative.safetensors:
Traceback (most recent call last):
File "/content/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 134, in load_textual_inversion_embeddings
process_file(fullfn, fn)
File "/content/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 104, in process_file
if 'string_to_param' in data:
TypeError: argument of type 'NoneType' is not iterable

Error verifying pickled file from /content/stable-diffusion-webui/embeddings/.ipynb_checkpoints:
Traceback (most recent call last):
File "/content/stable-diffusion-webui/modules/safe.py", line 135, in load_with_extra
check_pt(filename, extra_handler)
File "/content/stable-diffusion-webui/modules/safe.py", line 81, in check_pt
with zipfile.ZipFile(filename) as z:
File "/usr/lib/python3.8/zipfile.py", line 1251, in init
self.fp = io.open(file, filemode)
IsADirectoryError: [Errno 21] Is a directory: '/content/stable-diffusion-webui/embeddings/.ipynb_checkpoints'

The file may be malicious, so the program is not going to read it.
You can skip this check with --disable-safe-unpickle commandline argument.

Error loading embedding .ipynb_checkpoints:
Traceback (most recent call last):
File "/content/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 134, in load_textual_inversion_embeddings
process_file(fullfn, fn)
File "/content/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 104, in process_file
if 'string_to_param' in data:
TypeError: argument of type 'NoneType' is not iterable

-----> !!!! 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.

Add --disable-safe-unpickle to your launch arguments and see if it launches without errors.

Alternatively, are you using the a somewhat recent version of the WebUI? Loading embeddings from .safetensors is been supported since 11th of January

-----> !!!! 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.

Add --disable-safe-unpickle to your launch arguments and see if it launches without errors.

Alternatively, are you using the a somewhat recent version of the WebUI? Loading embeddings from .safetensors is been supported since 11th of January

I already tried adding that launch argument but found no luck.
I use older version of WebUI because it has CivitAI downloader built in, but I will try to find a new one. Thank you for the advice.

Actually there are many things those online tutorials failed to taught. Some of them only work with certain pipeline. Most of the bugs are unrelated to --disable-safe-unpickle etc. I am tired of people throwing random answers. And at the same time I got similar problems. But try to find some working template of other models. Colab is totally different from local ones I realised. Local one is much easier to install with different methods.

deleted

@hydall

I was able to get a pt (pickletensor) version merged with this repo, should be good to download it from the main branch if you need it still!

https://huggingface.co/datasets/gsdf/EasyNegative/blob/main/EasyNegative.pt

Sign up or log in to comment