I have a question regarding the official StyleGAN2 implementation.
Instead of mapping directly from the input vector z to an output image, I wanted to also get the intermediate latent vector w. But I noticed that doing the pass through the neural network in two steps leads to a different output image.
Here is a basic code snippet that showcases what I did:
Gs_kwargs = dnnlib.EasyDict()
Gs_kwargs.output_transform = dict(func=tflib.convert_images_to_uint8, nchw_to_nhwc=True)
Gs_kwargs.randomize_noise = False
Gs_kwargs.minibatch_size = 1
image_1 = Gs.run(z, None, **Gs_kwargs)
image_2 = Gs.components.synthesis.run(Gs.components.mapping.run(z, None), **Gs_kwargs)
The network GS is the “stylegan2-ffhq-config-f” network.
I feel like I am missing something obvious, since it does not make any sense that performing both operations individually leads to a different output than performing them at once. The images have some common traits but are far more different than could be explained by different noise inputs that are somehow not deactivated.
Thank you for your help!