From 8ace2669d285b7c9ecccfea9161a8ad9e11caceb Mon Sep 17 00:00:00 2001 From: Wok Date: Tue, 3 Nov 2020 21:08:18 +0100 Subject: [PATCH] Fix AssertionError https://github.com/NVlabs/stylegan2-ada/issues/25 --- generate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate.py b/generate.py index 42210a5a..1f6c5e69 100755 --- a/generate.py +++ b/generate.py @@ -33,7 +33,7 @@ def generate_images(network_pkl, seeds, truncation_psi, outdir, class_idx, dlate if dlatents_npz is not None: print(f'Generating images from dlatents file "{dlatents_npz}"') dlatents = np.load(dlatents_npz)['dlatents'] - assert dlatents.shape[1:] == (18, 512) # [N, 18, 512] + assert dlatents.shape[-1] == 512 # [N, M, 512] imgs = Gs.components.synthesis.run(dlatents, output_transform=dict(func=tflib.convert_images_to_uint8, nchw_to_nhwc=True)) for i, img in enumerate(imgs): fname = f'{outdir}/dlatent{i:02d}.png'