diff --git a/setup.py b/setup.py index 7c61d24..12f8f69 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ name = 'stylegan2_pytorch', packages = find_packages(), scripts=['bin/stylegan2_pytorch'], - version = '0.17.0', + version = '0.17.1', license='GPLv3+', description = 'StyleGan2 in Pytorch', author = 'Phil Wang', diff --git a/stylegan2_pytorch/stylegan2_pytorch.py b/stylegan2_pytorch/stylegan2_pytorch.py index da13965..c76fd05 100644 --- a/stylegan2_pytorch/stylegan2_pytorch.py +++ b/stylegan2_pytorch/stylegan2_pytorch.py @@ -907,7 +907,7 @@ def generate_interpolation(self, num = 0, num_image_tiles = 8, trunc = 1.0): latents = [(interp_latents, num_layers)] generated_images = self.generate_truncated(self.GAN.SE, self.GAN.GE, latents, n, trunc_psi = self.trunc_psi) images_grid = torchvision.utils.make_grid(generated_images, nrow = num_rows) - pil_image = transforms.ToPILImage()(images_grid.cpu()) + pil_image = transforms.ToPILImage()(images_grid.cpu()).convert('RGB') frames.append(pil_image) frames[0].save(str(self.results_dir / self.name / f'{str(num)}.gif'), save_all=True, append_images=frames[1:], duration=80, loop=0, optimize=True)