stylegan2-pytorch icon indicating copy to clipboard operation
stylegan2-pytorch copied to clipboard

How to use the *.pt file to generate the images?

Open ruanjiyang opened this issue 4 years ago • 5 comments

Dear Rosinality

I used project.py to get the pt file for one images. Could you let me know how to use this pt file to generate the images? thanks.

ruanjiyang avatar Apr 27 '21 14:04 ruanjiyang

It will have latent codes and learnt noises. You can pass it to the generator.

rosinality avatar Apr 28 '21 00:04 rosinality

got it. thanks.

can I only pass the latent codes to generator? I mean don't pass the learnt noises.

ruanjiyang avatar Apr 30 '21 05:04 ruanjiyang

You can inject it as in this: https://github.com/rosinality/stylegan2-pytorch/blob/f8dc9ad21746c81029c86eb8a3bfaf92a3988ce6/projector.py#L192

rosinality avatar Apr 30 '21 15:04 rosinality

thanks!

ruanjiyang avatar May 01 '21 07:05 ruanjiyang

Dear Rosinality

I used project.py to get the pt file for one images. Could you let me know how to use this pt file to generate the images? thanks.

Hey, how did you do this ? I am really trying to understand how to work to get latents in .pt for my own image.

kashishnaqvi101 avatar Jun 22 '23 19:06 kashishnaqvi101