minar09 / cp-vton-plus

Official implementation for "CP-VTON+: Clothing Shape and Texture Preserving Image-Based Virtual Try-On", CVPRW 2020
https://minar09.github.io/cpvtonplus/
MIT License
343 stars 120 forks source link

error while using pretrained model #110

Open sudip550 opened 11 months ago

sudip550 commented 11 months ago

i am using pretrained model and geting below error =

Namespace(name='GMM', dress_type='dresses', gpu_ids='', workers=4, batch_size=4, dataroot='./../result', datamode='test', stage='GMM', data_list='./../result/inference_dress.txt', fine_width=384, fine_height=512, radius=5, grid_size=10, tensorboard_dir='tensorboard', result_dir='result', checkpoint='./../../gdrive/MyDrive/gmm_final.pth', display_count=1, shuffle=False) Start to test stage: GMM, named: GMM! /usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:560: UserWarning: This DataLoader will create 4 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary. warnings.warn(_create_warning_msg( initialization method [normal] initialization method [normal] Traceback (most recent call last): File "/content/virtual-try-on-app/network/test.py", line 231, in main() File "/content/virtual-try-on-app/network/test.py", line 215, in main load_checkpoint(model, opt.checkpoint) File "/content/virtual-try-on-app/network/networks.py", line 556, in load_checkpoint model.load_state_dict(torch.load(checkpoint_path)) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 2041, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for GMM: size mismatch for regression.conv.0.weight: copying a param with shape torch.Size([512, 192, 4, 4]) from checkpoint, the shape in current model is torch.Size([512, 768, 4, 4]). size mismatch for regression.linear.weight: copying a param with shape torch.Size([50, 768]) from checkpoint, the shape in current model is torch.Size([200, 3072]). size mismatch for regression.linear.bias: copying a param with shape torch.Size([50]) from checkpoint, the shape in current model is torch.Size([200]).