Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change image size? #14

Open
armeausstahl opened this issue Dec 31, 2021 · 3 comments
Open

How to change image size? #14

armeausstahl opened this issue Dec 31, 2021 · 3 comments

Comments

@armeausstahl
Copy link

Hey @ZPdesu ,

I love your project and currently working on some test cases. I want to improve the speed of embeddings by using smaller pictures. Is there a easy to achieve this?

I used
python align_face.py -output_size 512
to generate the pictures with size 512

after running
python main.py --im_path1 90.png --im_path2 20.png --im_path3 20.png --sign realistic --smooth 5 --size 512

I got this error:

RuntimeError: Error(s) in loading state_dict for Generator:
        Unexpected key(s) in state_dict: "convs.14.conv.weight", "convs.14.conv.blur.kernel", "convs.14.conv.modulation.weight", "convs.14.conv.modulation.bias", "convs.14.noise.weight", "convs.14.activate.bias", "convs.15.conv.weight", "convs.15.conv.modulation.weight", "convs.15.conv.modulation.bias", "convs.15.noise.weight", "convs.15.activate.bias", "to_rgbs.7.bias", "to_rgbs.7.upsample.kernel", "to_rgbs.7.conv.weight", "to_rgbs.7.conv.modulation.weight", "to_rgbs.7.conv.modulation.bias", "noises.noise_15", "noises.noise_16".


@ZPdesu
Copy link
Owner

ZPdesu commented Jan 9, 2022

I did not do tests on 512 x 512 images. Maybe you should download the weights of the StyleGAN generator trained on 512x512 FFHQ images.

@deng-wei
Copy link

I did not do tests on 512 x 512 images. Maybe you should download the weights of the StyleGAN generator trained on 512x512 FFHQ images.

I also encountered this problem. I want to use a smaller size of StyleGAN2 due to the limitation of the machine resources. But I don't know how to get the .pt file. Are you trained by yourself or converted from the official .pkl weights?

@sunzongzheng
Copy link

same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants