realworld-stylegan2-encoder icon indicating copy to clipboard operation
realworld-stylegan2-encoder copied to clipboard

e4e decoder checkpoint mismatch

Open InzamamAnwar opened this issue 1 year ago • 1 comments

Hi,

While running the e4e model with torch platform, following mismatch error occurs

Unexpected key(s) in state_dict: "convs.12.conv.weight", "convs.12.conv.blur.kernel", "convs.12.conv.modulation.weight", "convs.12.conv.modulation.bias", "convs.12.noise.weight", "convs.12.activate.bias", "convs.13.conv.weight", "convs.13.conv.modulation.weight", "convs.13.conv.modulation.bias", "convs.13.noise.weight", "convs.13.activate.bias", "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.6.bias", "to_rgbs.6.upsample.kernel", "to_rgbs.6.conv.weight", "to_rgbs.6.conv.modulation.weight", "to_rgbs.6.conv.modulation.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_13", "noises.noise_14", "noises.noise_15", "noises.noise_16"

Either the parameters to construct decoder are wrong in the test script or the checkpoint was saved with different parameters.

Reconstruction Steps

  1. Download model from Google drive
  2. Run the following command
python scripts/test.py \
--ckpt ./torch/e4e_encode_mobile_cartoon.pt \
--network e4e \
--platform torch \
--align \
--images_path ./test-images

Can anyone verify it?

InzamamAnwar avatar Nov 18 '22 19:11 InzamamAnwar