Skip to content

Commit

Permalink
Merge pull request Sygil-Dev#34 from ZeroCool940711/dev
Browse files Browse the repository at this point in the history
Changed the pretrained "pretrained=True" to be "weights=torchvision.models.VGG16_Weights.DEFAULT" so it is compatible with latest version of torchvision and also so we always get the latest version of the weights.
  • Loading branch information
ZeroCool940711 authored Jun 17, 2023
2 parents 85a558f + 6daee00 commit 7e88978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion muse_maskgit_pytorch/vqgan_vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def vgg(self):
if exists(self._vgg):
return self._vgg

vgg = torchvision.models.vgg16(pretrained=True)
vgg = torchvision.models.vgg16(weights=torchvision.models.VGG16_Weights.DEFAULT)
vgg.classifier = nn.Sequential(*vgg.classifier[:-2])
self._vgg = vgg.to(self.device)
return self._vgg
Expand Down

0 comments on commit 7e88978

Please sign in to comment.