ai-forever / ai-forever/ghost-2.0

Corrupt file issue

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
151
Forks
19
PR merge metrics
No merged PRs in 30d

Description

File "/root/repos/ghost-2.0/infer_video.py", line 256, in
main(args)
File "/root/repos/ghost-2.0/infer_video.py", line 153, in main
aligner = AlignerModule(cfg_a)
File "/root/repos/ghost-2.0/train_aligner.py", line 149, in __init__
self.aligner_loss = AlignerLoss(
File "/root/repos/ghost-2.0/train_aligner.py", line 32, in __init__
self.emotion_loss = EmotionLoss()
File "/root/repos/ghost-2.0/src/losses/emotion.py", line 17, in __init__
self.model = load_model(Path(path_to_models) / model_name)
File "/root/repos/ghost-2.0/repos/emoca/gdl_apps/EmotionRecognition/utils/io.py", line 89, in load_model
model = model_class.load_from_checkpoint(checkpoint_path=checkpoint, strict=False, **checkpoint_kwargs)
File "/opt/conda/envs/ghost/lib/python3.10/site-packages/pytorch_lightning/utilities/model_helpers.py", line 125, in wrapper
return self.method(cls, *args, **kwargs)
File "/opt/conda/envs/ghost/lib/python3.10/site-packages/pytorch_lightning/core/module.py", line 1581, in load_from_checkpoint
loaded = _load_from_checkpoint(
File "/opt/conda/envs/ghost/lib/python3.10/site-packages/pytorch_lightning/core/saving.py", line 91, in _load_from_checkpoint
model = _load_state(cls, checkpoint, strict=strict, **kwargs)
File "/opt/conda/envs/ghost/lib/python3.10/site-packages/pytorch_lightning/core/saving.py", line 165, in _load_state
obj = instantiator(cls, _cls_kwargs) if instantiator else cls(**_cls_kwargs)
File "/root/repos/ghost-2.0/./repos/emoca/gdl/models/EmoCnnModule.py", line 69, in __init__
load_state_dict(self.backbone, config.model.pretrained_weights)
File "/root/repos/ghost-2.0/./repos/emoca/gdl/layers/losses/FRNet.py", line 179, in load_state_dict
weights = torch.load("/root/repos/ghost-2.0/weights/resnet50_ft_weight.pkl", map_location='cpu', weights_only=False)['state_dict']
File "/opt/conda/envs/ghost/lib/python3.10/site-packages/torch/serialization.py", line 1495, in load
return _legacy_load(
File "/opt/conda/envs/ghost/lib/python3.10/site-packages/torch/serialization.py", line 1746, in _legacy_load
raise RuntimeError("Invalid magic number; corrupt file?")
RuntimeError: Invalid magic number; corrupt file?

i am using the resnet_ft_50.pkl weights and getting this error

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.