AUTOMATIC1111 / stable-diffusion-webui-pixelization

stable-diffusion-webui-pixelization
MIT License
550 stars 72 forks source link

Error(s) in loading state_dict #19

Open WorldofDepth opened 1 year ago

WorldofDepth commented 1 year ago

Any idea why I get this error? I've downloaded the three checkpoint models, and should be fine on RAM… Thank you for any help.

RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: "module.PBEnc.vgg.0.weight", "module.PBEnc.vgg.0.bias" [continues to list many files]

Azq2 commented 1 year ago

image

This should fix

            self.G_A_net = torch.nn.DataParallel(self.G_A_net)
            self.alias_net = torch.nn.DataParallel(self.alias_net)
WorldofDepth commented 1 year ago

Thank you. Where / which file should that be inserted into?

Azq2 commented 1 year ago

https://github.com/AUTOMATIC1111/stable-diffusion-webui-pixelization/blob/master/scripts/postprocessing_pixelization.py#L126