Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colab error in sr #6

Open
loboere opened this issue Apr 26, 2022 · 1 comment
Open

colab error in sr #6

loboere opened this issue Apr 26, 2022 · 1 comment

Comments

@loboere
Copy link

loboere commented Apr 26, 2022

!python demo/restoration_single_face_demo.py --config configs/panini_sr.py --checkpoint checkpoint/panini_sr_latest.pth --img_path /content/panini/examples/SR_result/00001.png --save_path examples/SR_result/result.png

load checkpoint from http path: http://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-ffhq-config-f-official_20210327_171224-bce9310c.pth
2022-04-26 05:22:09,092 - mmedit - INFO - Load pretrained model from http://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-ffhq-config-f-official_20210327_171224-bce9310c.pth
0
1
2
3
load checkpoint from http path: http://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-ffhq-config-f-official_20210327_171224-bce9310c.pth
2022-04-26 05:22:10,933 - mmedit - INFO - Load pretrained model from http://download.openmmlab.com/mmgen/stylegan2/official_weights/stylegan2-ffhq-config-f-official_20210327_171224-bce9310c.pth
2022-04-26 05:22:13,327 - mmedit - INFO - load checkpoint from torchvision path: torchvision://vgg16
load checkpoint from local path: checkpoint/panini_sr_latest.pth
Traceback (most recent call last):
File "demo/restoration_single_face_demo.py", line 65, in
main()
File "demo/restoration_single_face_demo.py", line 48, in main
args.config, args.checkpoint, device=torch.device('cuda', args.device))
File "./mmedit/apis/train.py", line 45, in init_model
checkpoint = load_checkpoint(model, checkpoint)
File "/usr/local/lib/python3.7/dist-packages/mmcv/runner/checkpoint.py", line 581, in load_checkpoint
checkpoint = _load_checkpoint(filename, map_location, logger)
File "/usr/local/lib/python3.7/dist-packages/mmcv/runner/checkpoint.py", line 520, in _load_checkpoint
return CheckpointLoader.load_checkpoint(filename, map_location, logger)
File "/usr/local/lib/python3.7/dist-packages/mmcv/runner/checkpoint.py", line 285, in load_checkpoint
return checkpoint_loader(filename, map_location)
File "/usr/local/lib/python3.7/dist-packages/mmcv/runner/checkpoint.py", line 302, in load_from_local
checkpoint = torch.load(filename, map_location=map_location)
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 713, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 920, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
EOFError: Ran out of input

@jianzhangcs
Copy link
Owner

Thank you for your attention and questions!
It looks like you loaded an empty file. Maybe you can check that the .pth is fully downloaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants