ChrisChen1023 / HINT

HINT: High-quality INpainting Transformer with Enhanced Attention and Mask-aware Encoding
MIT License
30 stars 4 forks source link

load model #2

Closed xLuge closed 8 months ago

xLuge commented 8 months ago

when i load the model in './checkpoints/CelebA/InpaintingModel_gen.pth' , an error 'RuntimeError: Error(s) in loading state_dict for HINT:Unexpected key(s) in state_dict: "refinement.0.norm1_1.body.weight", "refinement.0.norm1_1.body.bias..."' occurs

amssss0 commented 8 months ago

I had the same problem.

ChrisChen1023 commented 8 months ago

when i load the model in './checkpoints/CelebA/InpaintingModel_gen.pth' , an error 'RuntimeError: Error(s) in loading state_dict for HINT:Unexpected key(s) in state_dict: "refinement.0.norm1_1.body.weight", "refinement.0.norm1_1.body.bias..."' occurs

Hi Luge,

Thanks for your interests. To solve this you could use 'strict =False' during loading the model in 'model.py', which has been updated now. please let me know if you meet other problems. Cheers.

ChrisChen1023 commented 8 months ago

I had the same problem.

Please see the previous comment.