The arcface model cannot be loaded #51

Open
opened 2021-07-16 05:28:16 +02:00 by alan525 · 3 comments
alan525 commented 2021-07-16 05:28:16 +02:00 (Migrated from github.com)

It's a great project. I follow the instructions to configure the environment. When the code runs to netArc_checkpoint=torch.load(netArc_checkpoint) an error is reported.
..torch/serialization.py line 702, in _legacy_load
result = unpickler.load()
AttributeError: Can't get attribute 'ArcMarginModel' on <module 'models' from 'SimSwap-main/models/init.py'>
How to solve it? Is the model incorrect?

It's a great project. I follow the instructions to configure the environment. When the code runs to netArc_checkpoint=torch.load(netArc_checkpoint) an error is reported. ..torch/serialization.py line 702, in _legacy_load result = unpickler.load() AttributeError: Can't get attribute 'ArcMarginModel' on <module 'models' from 'SimSwap-main/models/__init__.py'> How to solve it? Is the model incorrect?
NNNNAI commented 2021-07-17 08:42:32 +02:00 (Migrated from github.com)

Could you share the command line you used?

Could you share the command line you used?
alan525 commented 2021-07-18 13:56:07 +02:00 (Migrated from github.com)

command python test_one_image.py --isTrain false --name people --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path crop_224/6.jpg --pic_b_path crop_224/ds.jpg --output_path output/

I'm sure the download model and path are correct.However, the model loading still failed.
SimSwap/models/fs_model.py line 64
netArc_checkpoint=torch.load(netArc_checkpoint)

command python test_one_image.py --isTrain false --name people --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path crop_224/6.jpg --pic_b_path crop_224/ds.jpg --output_path output/ I'm sure the download model and path are correct.However, the model loading still failed. SimSwap/models/fs_model.py line 64 netArc_checkpoint=torch.load(netArc_checkpoint)
woctezuma commented 2021-07-18 15:58:56 +02:00 (Migrated from github.com)

SimSwap/models/fs_model.py line 64
netArc_checkpoint=torch.load(netArc_checkpoint)

#9, #10, #24

> SimSwap/models/fs_model.py line 64 > netArc_checkpoint=torch.load(netArc_checkpoint) #9, #10, #24
Sign in to join this conversation.