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

model load failed when use GFPGAN

Open uuleaf opened this issue 3 years ago • 1 comments

ubuntu 20.04 Package Version


absl-py 1.2.0 accelerate 0.13.1 addict 2.4.0 aiohttp 3.8.3 aiosignal 1.2.0 analytics-python 1.4.0 antlr4-python3-runtime 4.9.3 anyio 3.6.1 async-timeout 4.0.2 attrs 22.1.0 backoff 1.10.0 basicsr 1.4.2 bcrypt 4.0.0 beautifulsoup4 4.11.1 brotlipy 0.7.0 cachetools 5.2.0 certifi 2022.9.24 cffi 1.15.1 chardet 4.0.0 charset-normalizer 2.0.4 clean-fid 0.1.31 click 8.1.3 clip-anytorch 2.5.0 coloredlogs 15.0.1 contourpy 1.0.5 cryptography 37.0.1 cycler 0.11.0 diffusers 0.4.1 docker-pycreds 0.4.0 einops 0.5.0 facexlib 0.2.5 fairscale 0.4.4 fastapi 0.85.0 ffmpy 0.3.0 filelock 3.8.0 filterpy 1.4.5 flatbuffers 22.9.24 font-roboto 0.0.1 fonts 0.0.3 fonttools 4.37.4 frozenlist 1.3.1 fsspec 2022.8.2 ftfy 6.1.1 functorch 0.2.1 future 0.18.2 gdown 4.5.1 gfpgan 1.3.8 gitdb 4.0.9 GitPython 3.1.28 google-auth 2.12.0 google-auth-oauthlib 0.4.6 gradio 3.4b3 grpcio 1.49.1 h11 0.12.0 httpcore 0.15.0 httpx 0.23.0 huggingface-hub 0.10.0 humanfriendly 10.0 idna 2.10 imageio 2.22.1 importlib-metadata 5.0.0 importlib-resources 5.10.0 invisible-watermark 0.1.5 Jinja2 3.1.2 jsonmerge 1.8.0 jsonschema 4.16.0 k-diffusion 0.0.9 kiwisolver 1.4.4 kornia 0.6.7 lark 1.1.2 linkify-it-py 1.0.3 llvmlite 0.39.1 lmdb 1.3.0 Markdown 3.4.1 markdown-it-py 2.1.0 MarkupSafe 2.1.1 matplotlib 3.6.1 mdit-py-plugins 0.3.1 mdurl 0.1.2 mkl-fft 1.3.1 mkl-random 1.2.2 mkl-service 2.4.0 monotonic 1.6 mpmath 1.2.1 multidict 6.0.2 networkx 2.8.7 numba 0.56.2 numpy 1.23.3 oauthlib 3.2.1 omegaconf 2.2.3 onnx 1.12.0 onnxruntime 1.12.1 opencv-python 4.6.0.66 orjson 3.8.0 packaging 21.3 pandas 1.5.0 paramiko 2.11.0 pathtools 0.1.2 piexif 1.1.3 Pillow 9.2.0 pip 20.3.3 pkgutil-resolve-name 1.3.10 promise 2.3 protobuf 3.19.6 psutil 5.9.2 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycparser 2.21 pycryptodome 3.15.0 pydantic 1.10.2 pyDeprecate 0.3.2 pydub 0.25.1 PyNaCl 1.5.0 pyOpenSSL 22.0.0 pyparsing 3.0.9 pyrsistent 0.18.1 PySocks 1.7.1 python-dateutil 2.8.2 python-multipart 0.0.4 pytorch-lightning 1.7.7 pytz 2022.4 PyWavelets 1.4.1 PyYAML 6.0 realesrgan 0.3.0 regex 2022.9.13 requests 2.25.1 requests-oauthlib 1.3.1 resize-right 0.0.2 rfc3986 1.5.0 rsa 4.9 scikit-image 0.19.3 scipy 1.9.2 sentry-sdk 1.9.10 setproctitle 1.3.2 setuptools 59.8.0 shortuuid 1.0.9 six 1.16.0 smmap 5.0.0 sniffio 1.3.0 soupsieve 2.3.2.post1 starlette 0.20.4 sympy 1.11.1 tb-nightly 2.11.0a20221008 tensorboard 2.10.1 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tifffile 2022.8.12 timm 0.4.12 tokenizers 0.12.1 torch 1.11.0+cu113 torchdiffeq 0.2.3 torchmetrics 0.10.0 torchvision 0.12.0 tqdm 4.64.1 transformers 4.19.2 typing-extensions 4.3.0 uc-micro-py 1.0.1 urllib3 1.26.11 uvicorn 0.18.3 wandb 0.13.4 wcwidth 0.2.5 websockets 10.3 Werkzeug 2.2.2 wheel 0.37.1 yapf 0.32.0 yarl 1.8.1 zipp 3.9.0

Describe the bug Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth" to /data2/py/imgtool/models/GFPGAN/detection_Resnet50_Final.pth

100%|??????????????????????????????????????????????????????????????????????| 104M/104M [04:23<00:00, 415kB/s] Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.2.2/parsing_parsenet.pth" to /data2/py/imgtool/models/GFPGAN/parsing_parsenet.pth

100%|???????????????????????????????????????????????????????????????????| 81.4M/81.4M [00:04<00:00, 20.8MB/s] Error completing request Arguments: (0, <PIL.Image.Image image mode=RGB size=512x512 at 0x7F8E08AA1DC0>, None, 0.066, 0, 0, 2, 0, 0, 1) {} Traceback (most recent call last): File "/data2/py/imgtool/modules/ui.py", line 158, in f res = list(func(*args, **kwargs)) File "webui.py", line 68, in f res = func(*args, **kwargs) File "/data2/py/imgtool/modules/extras.py", line 51, in run_extras restored_img = modules.gfpgan_model.gfpgan_fix_faces(np.array(image, dtype=np.uint8)) File "/data2/py/imgtool/modules/gfpgan_model.py", line 52, in gfpgan_fix_faces model = gfpgann() File "/data2/py/imgtool/modules/gfpgan_model.py", line 39, in gfpgann model = gfpgan_constructor(model_path=model_file, upscale=1, arch='clean', channel_multiplier=2, bg_upsampler=None) File "/home/xxxx/anaconda3/envs/automatic/lib/python3.8/site-packages/gfpgan/utils.py", line 92, in init loadnet = torch.load(model_path) File "/home/xxxx/anaconda3/envs/automatic/lib/python3.8/site-packages/torch/serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/home/xxxx/anaconda3/envs/automatic/lib/python3.8/site-packages/torch/serialization.py", line 938, in _legacy_load typed_storage._storage._set_from_file( RuntimeError: unexpected EOF, expected 115257 more bytes. The file might be corrupted.

uuleaf avatar Oct 09 '22 13:10 uuleaf

Same problem

theoretischer avatar Oct 30 '22 11:10 theoretischer

i have script that bootstraps an aws ec2, same ubuntu 20.04 amd, i started having this problem out of the blue as well

pixelicous avatar Feb 02 '23 22:02 pixelicous

Closing as stale.

catboxanon avatar Aug 03 '23 18:08 catboxanon

I fixed this by re-downloading all of files below stable-diffusion-webui/models/GFPGAN folder.And it works! related issue

ziqiya avatar Aug 16 '23 10:08 ziqiya