Algolzw / daclip-uir

[ICLR 2024] Controlling Vision-Language Models for Universal Image Restoration. 5th place in the NTIRE 2024 Restore Any Image Model in the Wild Challenge.
https://algolzw.github.io/daclip-uir
MIT License
632 stars 29 forks source link

size mismatch between the provided pretrained model and the current model #3

Open msk7131 opened 11 months ago

msk7131 commented 11 months ago
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(

RuntimeError: Error(s) in loading state_dict for ConditionalUNet: size mismatch for downs.3.3.weight: copying a param with shape torch.Size([512, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 256, 3, 3]). size mismatch for ups.0.0.mlp.1.weight: copying a param with shape torch.Size([1024, 256]) from checkpoint, the shape in current model is torch.Size([512, 256]). size mismatch for ups.0.0.mlp.1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for ups.0.0.block1.proj.weight: copying a param with shape torch.Size([512, 768, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 512, 3, 3]). size mismatch for ups.0.0.block2.proj.weight: copying a param with shape torch.Size([512, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 256, 3, 3]). size mismatch for ups.0.0.res_conv.weight: copying a param with shape torch.Size([512, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([256, 512, 1, 1]). size mismatch for ups.0.1.mlp.1.weight: copying a param with shape torch.Size([1024, 256]) from checkpoint, the shape in current model is torch.Size([512, 256]). size mismatch for ups.0.1.mlp.1.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for ups.0.1.block1.proj.weight: copying a param with shape torch.Size([512, 768, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 512, 3, 3]). size mismatch for ups.0.1.block2.proj.weight: copying a param with shape torch.Size([512, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 256, 3, 3]). size mismatch for ups.0.1.res_conv.weight: copying a param with shape torch.Size([512, 768, 1, 1]) from checkpoint, the shape in current model is torch.Size([256, 512, 1, 1]). size mismatch for ups.0.2.fn.fn.norm.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]). size mismatch for ups.0.2.fn.fn.norm.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]). size mismatch for ups.0.2.fn.fn.proj_in.weight: copying a param with shape torch.Size([512, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([256, 256, 1, 1] size mismatch for ups.0.2.fn.fn.proj_in.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]). size mismatch for ups.0.2.fn.fn.transformer_blocks.0.attn1.to_q.weight: copying a param with shape torch.Size([512, 512]) from checkpoint, the shape in current model is torch.Siz6, 256]). size mismatch for ups.0.2.fn.fn.transformer_blocks.0.attn1.to_k.weight: copying a param with shape torch.Size([512, 512]) from checkpoint, the shape in current model is torch.Siz6, 256]). size mismatch for ups.0.2.fn.fn.transformer_blocks.0.attn1.to_v.weight: copying a param with shape torch.Size([512, 512]) from checkpoint, the shape in current model is torch.Siz6, 256]). size mismatch for ups.0.2.fn.fn.transformer_blocks.0.attn1.to_out.0.weight: copying a param with shape torch.Size([512, 512]) from checkpoint, the shape in current model is torch([256, 256]).

Algolzw commented 11 months ago

In the config file the ch_mult is updated to [1, 2, 4, 8]. Can you check it and try again?