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

There might be mistakes in weight_convert.py #12

Open
tlatlbtle opened this issue Mar 11, 2021 · 0 comments
Open

There might be mistakes in weight_convert.py #12

tlatlbtle opened this issue Mar 11, 2021 · 0 comments

Comments

@tlatlbtle
Copy link

Hi, thanks for your repo.
I have downloaded the official TensorFlow model from https://drive.google.com/uc?id=1MEGjdvVpUsu1jB4zrXZN7Y4kBBOzizDQ.
Then I successfully run weight_convert.py.

However, when I am trying to run the code, there are errors when load the model:

`Missing key(s) in state_dict: "g_mapping.dense0.weight", "g_mapping.dense0.bias", "g_mapping.dense1.weight", "g_mapping.dense1.bias", "g_mapping.dense2.weight", "g_mapping.dense2.bias", "g_mapping.dense3.weight", "g_mapping.dense3.bias", "g_mapping.dense4.weight", "g_mapping.dense4.bias", "g_mapping.dense5.weight", "g_mapping.dense5.bias", "g_mapping.dense6.weight", "g_mapping.dense6.bias", "g_mapping.dense7.weight", "g_mapping.dense7.bias", "g_synthesis.torgb.weight", "g_synthesis.torgb.bias", "g_synthesis.blocks.4x4.const", "g_synthesis.blocks.4x4.bias", "g_synthesis.blocks.4x4.epi1.top_epi.noise.weight", "g_synthesis.blocks.4x4.epi1.style_mod.lin.weight", "g_synthesis.blocks.4x4.epi1.style_mod.lin.bias", "g_synthesis.blocks.4x4.conv.weight", "g_synthesis.blocks.4x4.conv.bias", "g_synthesis.blocks.4x4.epi2.top_epi.noise.weight", "g_synthesis.blocks.4x4.epi2.style_mod.lin.weight", "g_synthesis.blocks.4x4.epi2.style_mod.lin.bias", "g_synthesis.blocks.8x8.conv0_up.weight", "g_synthesis.blocks.8x8.conv0_up.bias", "g_synthesis.blocks.8x8.conv0_up.intermediate.kernel", "g_synthesis.blocks.8x8.epi1.top_epi.noise.weight", "g_synthesis.blocks.8x8.epi1.style_mod.lin.weight", "g_synthesis.blocks.8x8.epi1.style_mod.lin.bias", "g_synthesis.blocks.8x8.conv1.weight", "g_synthesis.blocks.8x8.conv1.bias", "g_synthesis.blocks.8x8.epi2.top_epi.noise.weight", "g_synthesis.blocks.8x8.epi2.style_mod.lin.weight", "g_synthesis.blocks.8x8.epi2.style_mod.lin.bias", "g_synthesis.blocks.16x16.conv0_up.weight", "g_synthesis.blocks.16x16.conv0_up.bias", "g_synthesis.blocks.16x16.conv0_up.intermediate.kernel", "g_synthesis.blocks.16x16.epi1.top_epi.noise.weight", "g_synthesis.blocks.16x16.epi1.style_mod.lin.weight", "g_synthesis.blocks.16x16.epi1.style_mod.lin.bias", "g_synthesis.blocks.16x16.conv1.weight", "g_synthesis.blocks.16x16.conv1.bias", "g_synthesis.blocks.16x16.epi2.top_epi.noise.weight", "g_synthesis.blocks.16x16.epi2.style_mod.lin.weight", "g_synthesis.blocks.16x16.epi2.style_mod.lin.bias", "g_synthesis.blocks.32x32.conv0_up.weight", "g_synthesis.blocks.32x32.conv0_up.bias", "g_synthesis.blocks.32x32.conv0_up.intermediate.kernel", "g_synthesis.blocks.32x32.epi1.top_epi.noise.weight", "g_synthesis.blocks.32x32.epi1.style_mod.lin.weight", "g_synthesis.blocks.32x32.epi1.style_mod.lin.bias", "g_synthesis.blocks.32x32.conv1.weight", "g_synthesis.blocks.32x32.conv1.bias", "g_synthesis.blocks.32x32.epi2.top_epi.noise.weight", "g_synthesis.blocks.32x32.epi2.style_mod.lin.weight", "g_synthesis.blocks.32x32.epi2.style_mod.lin.bias", "g_synthesis.blocks.64x64.conv0_up.weight", "g_synthesis.blocks.64x64.conv0_up.bias", "g_synthesis.blocks.64x64.conv0_up.intermediate.kernel", "g_synthesis.blocks.64x64.epi1.top_epi.noise.weight", "g_synthesis.blocks.64x64.epi1.style_mod.lin.weight", "g_synthesis.blocks.64x64.epi1.style_mod.lin.bias", "g_synthesis.blocks.64x64.conv1.weight", "g_synthesis.blocks.64x64.conv1.bias", "g_synthesis.blocks.64x64.epi2.top_epi.noise.weight", "g_synthesis.blocks.64x64.epi2.style_mod.lin.weight", "g_synthesis.blocks.64x64.epi2.style_mod.lin.bias", "g_synthesis.blocks.128x128.conv0_up.weight", "g_synthesis.blocks.128x128.conv0_up.bias", "g_synthesis.blocks.128x128.conv0_up.intermediate.kernel", "g_synthesis.blocks.128x128.epi1.top_epi.noise.weight", "g_synthesis.blocks.128x128.epi1.style_mod.lin.weight", "g_synthesis.blocks.128x128.epi1.style_mod.lin.bias", "g_synthesis.blocks.128x128.conv1.weight", "g_synthesis.blocks.128x128.conv1.bias", "g_synthesis.blocks.128x128.epi2.top_epi.noise.weight", "g_synthesis.blocks.128x128.epi2.style_mod.lin.weight", "g_synthesis.blocks.128x128.epi2.style_mod.lin.bias", "g_synthesis.blocks.256x256.conv0_up.weight", "g_synthesis.blocks.256x256.conv0_up.bias", "g_synthesis.blocks.256x256.conv0_up.intermediate.kernel", "g_synthesis.blocks.256x256.epi1.top_epi.noise.weight", "g_synthesis.blocks.256x256.epi1.style_mod.lin.weight", "g_synthesis.blocks.256x256.epi1.style_mod.lin.bias", "g_synthesis.blocks.256x256.conv1.weight", "g_synthesis.blocks.256x256.conv1.bias", "g_synthesis.blocks.256x256.epi2.top_epi.noise.weight", "g_synthesis.blocks.256x256.epi2.style_mod.lin.weight", "g_synthesis.blocks.256x256.epi2.style_mod.lin.bias", "g_synthesis.blocks.512x512.conv0_up.weight", "g_synthesis.blocks.512x512.conv0_up.bias", "g_synthesis.blocks.512x512.conv0_up.intermediate.kernel", "g_synthesis.blocks.512x512.epi1.top_epi.noise.weight", "g_synthesis.blocks.512x512.epi1.style_mod.lin.weight", "g_synthesis.blocks.512x512.epi1.style_mod.lin.bias", "g_synthesis.blocks.512x512.conv1.weight", "g_synthesis.blocks.512x512.conv1.bias", "g_synthesis.blocks.512x512.epi2.top_epi.noise.weight", "g_synthesis.blocks.512x512.epi2.style_mod.lin.weight", "g_synthesis.blocks.512x512.epi2.style_mod.lin.bias", "g_synthesis.blocks.1024x1024.conv0_up.weight", "g_synthesis.blocks.1024x1024.conv0_up.bias", "g_synthesis.blocks.1024x1024.conv0_up.intermediate.kernel", "g_synthesis.blocks.1024x1024.epi1.top_epi.noise.weight", "g_synthesis.blocks.1024x1024.epi1.style_mod.lin.weight", "g_synthesis.blocks.1024x1024.epi1.style_mod.lin.bias", "g_synthesis.blocks.1024x1024.conv1.weight", "g_synthesis.blocks.1024x1024.conv1.bias", "g_synthesis.blocks.1024x1024.epi2.top_epi.noise.weight", "g_synthesis.blocks.1024x1024.epi2.style_mod.lin.weight", "g_synthesis.blocks.1024x1024.epi2.style_mod.lin.bias".
Unexpected key(s) in state_dict: "fromrgb.weight", "fromrgb.bias", "1024x1024.conv0.weight", "1024x1024.conv0.bias", "1024x1024.blur.kernel", "1024x1024.conv1_down.weight", "1024x1024.conv1_down.bias", "1024x1024.conv1_down.downscale.blur.kernel", "512x512.conv0.weight", "512x512.conv0.bias", "512x512.blur.kernel", "512x512.conv1_down.weight", "512x512.conv1_down.bias", "512x512.conv1_down.downscale.blur.kernel", "256x256.conv0.weight", "256x256.conv0.bias", "256x256.blur.kernel", "256x256.conv1_down.weight", "256x256.conv1_down.bias", "256x256.conv1_down.downscale.blur.kernel", "128x128.conv0.weight", "128x128.conv0.bias", "128x128.blur.kernel", "128x128.conv1_down.weight", "128x128.conv1_down.bias", "128x128.conv1_down.downscale.blur.kernel", "64x64.conv0.weight", "64x64.conv0.bias", "64x64.blur.kernel", "64x64.conv1_down.weight", "64x64.conv1_down.bias", "64x64.conv1_down.downscale.blur.kernel", "32x32.conv0.weight", "32x32.conv0.bias", "32x32.blur.kernel", "32x32.conv1_down.weight", "32x32.conv1_down.bias", "32x32.conv1_down.downscale.blur.kernel", "16x16.conv0.weight", "16x16.conv0.bias", "16x16.blur.kernel", "16x16.conv1_down.weight", "16x16.conv1_down.bias", "16x16.conv1_down.downscale.blur.kernel", "8x8.conv0.weight", "8x8.conv0.bias", "8x8.blur.kernel", "8x8.conv1_down.weight", "8x8.conv1_down.bias", "8x8.conv1_down.downscale.blur.kernel", "4x4.conv.weight", "4x4.conv.bias", "4x4.dense0.weight", "4x4.dense0.bias", "4x4.dense1.weight", "4x4.dense1.bias".

`
I wonder there might be any mismatch between the "karras2019stylegan-ffhq-1024x1024.pkl" I downloaded from the google link and the expected model.

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

1 participant