unexpected EOF, expected 273069 more bytes. #240

Closed
opened 2026-01-29 21:46:01 +00:00 by claunia · 5 comments
Owner

Originally created by @YosAwed on GitHub (Aug 29, 2022).

Hello,
I updated latest source code, but still I have an issue. I tried all three version pretrain data (V1, V1.2, V1.3) but all data was corrupted?
Any thought?

(base) PS C:\Users\xxxxx\gfpgan> python inference_gfpgan.py -i inputs\whole_imgs -o results -v 1.3 -s 2
Traceback (most recent call last):
File "inference_gfpgan.py", line 155, in
main()
File "inference_gfpgan.py", line 103, in main
restorer = GFPGANer(
File "C:\Users\xxxxx\gfpgan\gfpgan\utils.py", line 76, in init
self.face_helper = FaceRestoreHelper(
File "C:\Users\xxxxx\anaconda3\envs\base\lib\site-packages\facexlib\utils\face_restoration_helper.py", line 98, in init
self.face_det = init_detection_model(det_model, half=False, device=self.device)
File "C:\Users\xxxxx\anaconda3\envs\base\lib\site-packages\facexlib\detection_init_.py", line 20, in init_detection_model
load_net = torch.load(model_path, map_location=lambda storage, loc: storage)
File "C:\Users\xxxxx\anaconda3\envs\base\lib\site-packages\torch\serialization.py", line 713, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "C:\Users\xxxxx\anaconda3\envs\base\lib\site-packages\torch\serialization.py", line 938, in _legacy_load
typed_storage._storage._set_from_file(
RuntimeError: unexpected EOF, expected 273069 more bytes. The file might be corrupted.

Originally created by @YosAwed on GitHub (Aug 29, 2022). Hello, I updated latest source code, but still I have an issue. I tried all three version pretrain data (V1, V1.2, V1.3) but all data was corrupted? Any thought? (base) PS C:\Users\xxxxx\gfpgan> python inference_gfpgan.py -i inputs\whole_imgs -o results -v 1.3 -s 2 Traceback (most recent call last): File "inference_gfpgan.py", line 155, in <module> main() File "inference_gfpgan.py", line 103, in main restorer = GFPGANer( File "C:\Users\xxxxx\gfpgan\gfpgan\utils.py", line 76, in __init__ self.face_helper = FaceRestoreHelper( File "C:\Users\xxxxx\anaconda3\envs\base\lib\site-packages\facexlib\utils\face_restoration_helper.py", line 98, in __init__ self.face_det = init_detection_model(det_model, half=False, device=self.device) File "C:\Users\xxxxx\anaconda3\envs\base\lib\site-packages\facexlib\detection\__init__.py", line 20, in init_detection_model load_net = torch.load(model_path, map_location=lambda storage, loc: storage) File "C:\Users\xxxxx\anaconda3\envs\base\lib\site-packages\torch\serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "C:\Users\xxxxx\anaconda3\envs\base\lib\site-packages\torch\serialization.py", line 938, in _legacy_load typed_storage._storage._set_from_file( RuntimeError: unexpected EOF, expected 273069 more bytes. The file might be corrupted.
Author
Owner

@YosAwed commented on GitHub (Aug 31, 2022):

The file size of GFPGANv1.3.pth : 348,632,874 bytes. I got this file many times, but it seems to be same.

@YosAwed commented on GitHub (Aug 31, 2022): The file size of GFPGANv1.3.pth : 348,632,874 bytes. I got this file many times, but it seems to be same.
Author
Owner

@Evilom commented on GitHub (Aug 31, 2022):

i got the same problem, waiting for the resolution

@Evilom commented on GitHub (Aug 31, 2022): i got the same problem, waiting for the resolution
Author
Owner

@YosAwed commented on GitHub (Sep 1, 2022):

i got the same problem, waiting for the resolution

Hi! I found the cause. The problem caused by insufficient downloading data in
:\Users\username\anaconda3\envs\ldo\Lib\site-packages\facexlib\weights

Here are
detection_Resnet50_Final.pth : 109,497,761 bytes
parsing_parsenet.pth : 85,331,193 byes

Please check the file size. If it is lower than above value. You can download these files directly from
https://github.com/xinntao/facexlib/releases/download/v0.2.2/

I downloaded form above URL and it worked.

@YosAwed commented on GitHub (Sep 1, 2022): > i got the same problem, waiting for the resolution Hi! I found the cause. The problem caused by insufficient downloading data in <Drive>:\Users\username\anaconda3\envs\ldo\Lib\site-packages\facexlib\weights Here are detection_Resnet50_Final.pth : 109,497,761 bytes parsing_parsenet.pth : 85,331,193 byes Please check the file size. If it is lower than above value. You can download these files directly from https://github.com/xinntao/facexlib/releases/download/v0.2.2/ I downloaded form above URL and it worked.
Author
Owner

@huozhong-in commented on GitHub (Sep 1, 2022):

I'm using torch-nightly build for "mps" GPU mode, that file must not the same size...
File "/opt/homebrew/Caskroom/miniconda/base/envs/ldm/lib/python3.10/site-packages/torch/serialization.py", line 989, in _legacy_load typed_storage._storage._set_from_file( RuntimeError: unexpected EOF, expected 132688554 more bytes. The file might be corrupted.
please change the method for torch version detection.

@huozhong-in commented on GitHub (Sep 1, 2022): I'm using torch-nightly build for "mps" GPU mode, that file must not the same size... `File "/opt/homebrew/Caskroom/miniconda/base/envs/ldm/lib/python3.10/site-packages/torch/serialization.py", line 989, in _legacy_load typed_storage._storage._set_from_file( RuntimeError: unexpected EOF, expected 132688554 more bytes. The file might be corrupted.` please change the method for torch version detection.
Author
Owner

@Evilom commented on GitHub (Sep 1, 2022):

i got the same problem, waiting for the resolution

Hi! I found the cause. The problem caused by insufficient downloading data in :\Users\username\anaconda3\envs\ldo\Lib\site-packages\facexlib\weights

Here are detection_Resnet50_Final.pth : 109,497,761 bytes parsing_parsenet.pth : 85,331,193 byes

Please check the file size. If it is lower than above value. You can download these files directly from https://github.com/xinntao/facexlib/releases/download/v0.2.2/

I downloaded form above URL and it worked.

this problem occured when i use stable diffusion webUI,then i found the parsing_parsenet.pth in stable-diffusion-main\src\facexlib\facexlib\weights is less then 83332kb,and i download it from you url, and it works now, thanks

@Evilom commented on GitHub (Sep 1, 2022): > > i got the same problem, waiting for the resolution > > Hi! I found the cause. The problem caused by insufficient downloading data in :\Users\username\anaconda3\envs\ldo\Lib\site-packages\facexlib\weights > > Here are detection_Resnet50_Final.pth : 109,497,761 bytes parsing_parsenet.pth : 85,331,193 byes > > Please check the file size. If it is lower than above value. You can download these files directly from https://github.com/xinntao/facexlib/releases/download/v0.2.2/ > > I downloaded form above URL and it worked. this problem occured when i use stable diffusion webUI,then i found the parsing_parsenet.pth in stable-diffusion-main\src\facexlib\facexlib\weights is less then 83332kb,and i download it from you url, and it works now, thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#240