How do I load an image?
scooter7 opened this issue · 2 comments
How do I load an image?
You can't use this GUI to load an arbitrary image file (like a .jpg or .png). Instead, this project is designed to generate images using a pre-trained StyleGAN2 model, so the "image" is indirectly loaded through the model's weights. To generate images using the GUI, you need to have a pre-trained model's checkpoint file available and select it using the GUI's file dialog. The author has already added a link to download the checkpoint file in the main page --> https://github.com/JiauZhang/DragGAN/tree/main#stylegan2-pre-trained-model
I managed to add the file, but can't seem to create any drag actions yet.
If you want to load real image , you first need to project the image into latent space, refer to https://github.com/rosinality/stylegan2-pytorch/blob/master/projector.py, then you could load the latent and reconstruct the real image. I will add this feature later, but it is not currently under consideration