stylegan2-pytorch
stylegan2-pytorch copied to clipboard
problem with loading 32px checkpoint (CIFAR10)
Hi, I'm trying to load the CIFAR10 checkpoint (from NVIDIA official implementation page, after I converted the weights). I do this with this code `model = Generator(32, 512, 2)
ckpt = torch.load("path to CIFAR.pt")
self.model.load_state_dict(ckpt['g_ema'])`
and I'm getting this error RuntimeError: Error(s) in loading state_dict for Generator: size mismatch for style.1.weight: copying a param with shape torch.Size([512, 1024]) from checkpoint, the shape in current model is torch.Size([512, 512]).
how can I solve this problem?
Thanks.
I suppose you tried to convert the weights from stylegan2-ada repository. However, Nvidia's stylegan2-ada implementation is very different in comparison to the rosinality's stylegan2 implementation. stylegan2-ada is a solution for conditional generation problem, and this repo related to unconditional generation. So it's impossible to convert weights automatically