Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Try-on module pre-trained model is not valid #131

Open
Lehsuby opened this issue Feb 11, 2021 · 1 comment
Open

Try-on module pre-trained model is not valid #131

Lehsuby opened this issue Feb 11, 2021 · 1 comment

Comments

@Lehsuby
Copy link

Lehsuby commented Feb 11, 2021

@andrewjong Hi. When I try to load your Try-On model (Unet model) from Google Drive, I get the following error:

  File "test.py", line 10, in <module>
    main(train=False)
  File "/code/train.py", line 44, in main
    model = model_class.load_from_checkpoint(
  File "/root/miniconda3/envs/sams-pt1.6/lib/python3.8/site-packages/pytorch_lightning/core/saving.py", line 153, in load_from_checkpoint
    model = cls._load_model_state(checkpoint, *args, strict=strict, **kwargs)
  File "/root/miniconda3/envs/sams-pt1.6/lib/python3.8/site-packages/pytorch_lightning/core/saving.py", line 192, in _load_model_state
    model.load_state_dict(checkpoint['state_dict'], strict=strict)
  File "/root/miniconda3/envs/sams-pt1.6/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1044, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for UnetMaskModel:
        Missing key(s) in state_dict: "unet.model.model.1.model.3.model.1.weight", "unet.model.model.1.model.3.model.1.bias", "unet.model.model.1.model.3.model.3.model.1.weight", "unet.model.model.1.model.3.model.3.model.1.bias", "unet.model.model.1.model.3.model.3.model.3.model.1.weight", "unet.model.model.1.model.3.model.3.model.3.model.1.bias", "unet.model.model.1.model.3.model.3.model.3.model.3.gamma", "unet.model.model.1.model.3.model.3.model.3.model.3.query_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.3.query_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.3.key_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.3.key_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.3.value_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.3.value_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.4.model.1.weight", "unet.model.model.1.model.3.model.3.model.3.model.4.model.1.bias", "unet.model.model.1.model.3.model.3.model.3.model.4.model.2.gamma", "unet.model.model.1.model.3.model.3.model.3.model.4.model.2.query_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.4.model.2.query_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.4.model.2.key_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.4.model.2.key_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.4.model.2.value_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.4.model.2.value_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.4.model.5.weight", "unet.model.model.1.model.3.model.3.model.3.model.4.model.5.bias", "unet.model.model.1.model.3.model.3.model.3.model.4.model.7.gamma", "unet.model.model.1.model.3.model.3.model.3.model.4.model.7.query_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.4.model.7.query_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.4.model.7.key_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.4.model.7.key_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.4.model.7.value_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.4.model.7.value_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.7.weight", "unet.model.model.1.model.3.model.3.model.3.model.7.bias", "unet.model.model.1.model.3.model.3.model.3.model.9.gamma", "unet.model.model.1.model.3.model.3.model.3.model.9.query_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.9.query_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.9.key_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.9.key_conv.bias", "unet.model.model.1.model.3.model.3.model.3.model.9.value_conv.weight", "unet.model.model.1.model.3.model.3.model.3.model.9.value_conv.bias", "unet.model.model.1.model.3.model.3.model.6.weight", "unet.model.model.1.model.3.model.3.model.6.bias", "unet.model.model.1.model.3.model.6.weight", "unet.model.model.1.model.3.model.6.bias", "unet.model.model.1.model.6.weight", "unet.model.model.1.model.6.bias".
        Unexpected key(s) in state_dict: "unet.model.model.1.model.9.gamma", "unet.model.model.1.model.9.query_conv.weight", "unet.model.model.1.model.9.query_conv.bias", "unet.model.model.1.model.9.key_conv.weight", "unet.model.model.1.model.9.key_conv.bias", "unet.model.model.1.model.9.value_conv.weight", "unet.model.model.1.model.9.value_conv.bias", "unet.model.model.1.model.3.gamma", "unet.model.model.1.model.3.query_conv.weight", "unet.model.model.1.model.3.query_conv.bias", "unet.model.model.1.model.3.key_conv.weight", "unet.model.model.1.model.3.key_conv.bias", "unet.model.model.1.model.3.value_conv.weight", "unet.model.model.1.model.3.value_conv.bias", "unet.model.model.1.model.4.model.1.weight", "unet.model.model.1.model.4.model.1.bias", "unet.model.model.1.model.4.model.3.gamma", "unet.model.model.1.model.4.model.3.query_conv.weight", "unet.model.model.1.model.4.model.3.query_conv.bias", "unet.model.model.1.model.4.model.3.key_conv.weight", "unet.model.model.1.model.4.model.3.key_conv.bias", "unet.model.model.1.model.4.model.3.value_conv.weight", "unet.model.model.1.model.4.model.3.value_conv.bias", "unet.model.model.1.model.4.model.4.model.1.weight", "unet.model.model.1.model.4.model.4.model.1.bias", "unet.model.model.1.model.4.model.4.model.3.model.1.weight", "unet.model.model.1.model.4.model.4.model.3.model.1.bias", "unet.model.model.1.model.4.model.4.model.3.model.3.model.1.weight", "unet.model.model.1.model.4.model.4.model.3.model.3.model.1.bias", "unet.model.model.1.model.4.model.4.model.3.model.3.model.4.weight", "unet.model.model.1.model.4.model.4.model.3.model.3.model.4.bias", "unet.model.model.1.model.4.model.4.model.3.model.6.weight", "unet.model.model.1.model.4.model.4.model.3.model.6.bias", "unet.model.model.1.model.4.model.4.model.6.weight", "unet.model.model.1.model.4.model.4.model.6.bias", "unet.model.model.1.model.4.model.7.weight", "unet.model.model.1.model.4.model.7.bias", "unet.model.model.1.model.4.model.9.gamma", "unet.model.model.1.model.4.model.9.query_conv.weight", "unet.model.model.1.model.4.model.9.query_conv.bias", "unet.model.model.1.model.4.model.9.key_conv.weight", "unet.model.model.1.model.4.model.9.key_conv.bias", "unet.model.model.1.model.4.model.9.value_conv.weight", "unet.model.model.1.model.4.model.9.value_conv.bias", "unet.model.model.1.model.7.weight", "unet.model.model.1.model.7.bias".

It seems that the checkpoint was recorded before the last changes were made to the model architecture. Could you help with that?

@Vannaz
Copy link

Vannaz commented Apr 20, 2022

It's a pity that the ShineOn model checkpoint haven't been found now, I don't know if you can be provided again.

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

No branches or pull requests

2 participants