InterDigitalInc / latent-transformer

Official implementation for paper: A Latent Transformer for Disentangled Face Editing in Images and Videos.
https://arxiv.org/abs/2106.11895
Other
143 stars 22 forks source link

Problems of preparing StyleGAN2 generator and encoder #1

Closed alip7 closed 3 years ago

alip7 commented 3 years ago

Hi, thanks for your great work . I got some problems when I trying to reproduce your work. Firstly, do you mean download the whole repository of PSP and place it under your work directory, like:

latent-transformer
├pixel2style2pixel
     ├script
├configs
├data

second, I tried to modify pixel2style2pixel/scripts/inference.py but I got program errors said Unexpected indent when I add these two lines:

latent_save_path = os.path.join(test_opts.exp_dir, 'latent_code_%05d.npy'%global_i)
np.save(latent_save_path, latent_batch.cpu().numpy())

Are these two lines really behind result_batch, latent_batch = run_on_batch(input_cuda, net, opts) ? or need indent? I wonder if I make a mistake Thanks

alip7 commented 3 years ago

problems solved