Spaces:
Running
Running
Update models/c2pGen.py
Browse files121 unmodified lines122123124125126127128121 unmodified linessuper(PixelBlockEncoder, self).__init__()vgg19 = models.vgg.vgg19()vgg19.classifier._modules['6'] = nn.Linear(4096, 7, bias=True)vgg19.load_state_dict(torch.load('./pixelart_vgg19.pth' if not os.environ['PIX_MODEL'] else os.environ['PIX_MODEL'], map_location=torch.device('cpu')))self.vgg = vgg19.featuresfor p in self.vgg.parameters():p.requires_grad = False121 unmodified lines122123124125126127128121 unmodified linessuper(PixelBlockEncoder, self).__init__()vgg19 = models.vgg.vgg19()vgg19.classifier._modules['6'] = nn.Linear(4096, 7, bias=True)vgg19.load_state_dict(torch.load('./pixelart_vgg19.pth' if not os.environ['PIX_MODEL'] else os.environ['PIX_MODEL'], map_location=torch.device('cpu'), weights_only=True))self.vgg = vgg19.featuresfor p in self.vgg.parameters():p.requires_grad = False
models/c2pGen.py+1-1