Skip to content

Commit 6a37a77

Browse files
committed
fix an issue with new version of pytorch fid
1 parent c6ba730 commit 6a37a77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stylegan2_pytorch/stylegan2_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ def calculate_fid(self, num_batches):
11451145
for j in range(generated_images.size(0)):
11461146
torchvision.utils.save_image(generated_images[j, :, :, :], str(Path(fake_path) / f'{str(j + batch_num * self.batch_size)}-ema.{ext}'))
11471147

1148-
return fid_score.calculate_fid_given_paths([real_path, fake_path], 256, True, 2048)
1148+
return fid_score.calculate_fid_given_paths([real_path, fake_path], 256, latents.device, 2048)
11491149

11501150
@torch.no_grad()
11511151
def truncate_style(self, tensor, trunc_psi = 0.75):

stylegan2_pytorch/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.5.11'
1+
__version__ = '1.5.12'

0 commit comments

Comments
 (0)