stable-diffusion-webui
stable-diffusion-webui copied to clipboard
safe.py breaks this repo
Addition of the safe.py module makes it such that this repo cannot load the pickled transformer file in the huggingface cache, the same file this repo downloads automatically. I'm not sure what the rational of adding this module was if it needs to be disabled via the command line to work. A different approach is needed. There are already multiple reports #2465 #2235 #2179 with work arounds but no solution.
I get the same error by running "python launch.py" after deleting the folder "...\huggingface\transformers". It seems that it stops downloading the file when only 5% is downloaded and then verifying pickled file immediately. I guess a too sort time limit is set for downloading so we can never finish getting correct file and produce this error.
Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:29:51) [MSC v.1929 64 bit (AMD64)] Commit hash: Installing requirements for Web UI Launching Web UI with arguments: 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 Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 939k/939k [00:01<00:00, 696kB/s] Downloading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 512k/512k [00:01<00:00, 450kB/s] Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 389/389 [00:00<00:00, 275kB/s] Downloading: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 905/905 [00:00<00:00, 711kB/s] Downloading: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.41k/4.41k [00:00<00:00, 2.88MB/s] Downloading: 5%|█████████▍ | 76.9M/1.59G [01:39<33:39, 807kB/s] Error verifying pickled file from C:\Users\hello/.cache\huggingface\transformers\c506559a5367a918bab46c39c79af91ab88846b49c8abd9d09e699ae067505c6.6365d436cc844f2f2b4885629b559d8ff0938ac484c01a6796538b2665de96c7: Traceback (most recent call last): File "C:\AI_model\stable-diffusion-webui-master\modules\safe.py", line 76, in check_pt with zipfile.ZipFile(filename) as z: File "C:\Users\hello\miniconda3\envs\draw\lib\zipfile.py", line 1267, in init self._RealGetContents() File "C:\Users\hello\miniconda3\envs\draw\lib\zipfile.py", line 1334, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file
same
My problem is sloved,When I update win10 to win11 and retry the solution mentioned in #2465 it finally works out
This can be fixed without disabling that safety module by updating to a newer version of pytorch. Tested it with torch 1.13 and cuda 11.7, and it works.
Just run the Conda command for installing PyTorch on your system that you find on this page: https://pytorch.org/get-started/locally/ and it should get a working version.
can this still happen? happened to me a few times when there was not enough RAM, but no reports about it for past two months.