Closed chikiuso closed 2 years ago
It seems that you load a vtoonify-T model into a vtoonify-D model.
You need to use --backbone toonify
You can get a quick start here Just follow the examles and revise the input image/video path and model path
thanks!
Hi, I run the cpu version of the code and got the following message , pls help, thanks!
Traceback (most recent call last): File "/Users/chikiuso/Downloads/VToonify/style_transfer.py", line 63, in
vtoonify.load_state_dict(torch.load(args.ckpt, map_location=lambda storage, loc: storage)['g_ema'])
File "/opt/homebrew/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1604, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for VToonify:
Missing key(s) in state_dict: "generator.generator.style.1.weight", "generator.generator.style.1.bias", "generator.generator.style.2.weight", "generator.generator.style.2.bias", "generator.generator.style.3.weight", "generator.generator.style.3.bias", "generator.generator.style.4.weight", "generator.generator.style.4.bias", "generator.generator.style.5.weight", "generator.generator.style.5.bias", "generator.generator.style.6.weight", "generator.generator.style.6.bias", "generator.generator.style.7.weight", "generator.generator.style.7.bias", "generator.generator.style.8.weight", "generator.generator.style.8.bias", "generator.generator.input.input", "generator.generator.conv1.conv.weight", "generator.generator.conv1.conv.modulation.weight", "generator.generator.conv1.conv.modulation.bias", "generator.generator.conv1.noise.weight", "generator.generator.conv1.activate.bias", "generator.generator.to_rgb1.bias", "generator.generator.to_rgb1.conv.weight", "generator.generator.to_rgb1.conv.modulation.weight", "generator.generator.to_rgb1.conv.modulation.bias", "generator.generator.convs.0.conv.weight", "generator.generator.convs.0.conv.blur.kernel", "generator.generator.convs.0.conv.modulation.weight", "generator.generator.convs.0.conv.modulation.bias", "generator.generator.convs.0.noise.weight", "generator.generator.convs.0.activate.bias", "generator.generator.convs.1.conv.weight", "generator.generator.convs.1.conv.modulation.weight", "generator.generator.convs.1.conv.modulation.bias", "generator.generator.convs.1.noise.weight", "generator.generator.convs.1.activate.bias", "generator.generator.convs.2.conv.weight", "generator.generator.convs.2.conv.blur.kernel", "generator.generator.convs.2.conv.modulation.weight", "generator.generator.convs.2.conv.modulation.bias", "generator.generator.convs.2.noise.weight", "generator.generator.convs.2.activate.bias", "generator.generator.convs.3.conv.weight", "generator.generator.convs.3.conv.modulation.weight", "generator.generator.convs.3.conv.modulation.bias", "generator.generator.convs.3.noise.weight", "generator.generator.convs.3.activate.bias", "generator.generator.convs.4.conv.weight", "generator.generator.convs.4.conv.blur.kernel", "generator.generator.convs.4.conv.modulation.weight", "generator.generator.convs.4.conv.modulation.bias", "generator.generator.convs.4.noise.weight", "generator.generator.convs.4.activate.bias", "generator.generator.convs.5.conv.weight", "generator.generator.convs.5.conv.modulation.weight", "generator.generator.convs.5.conv.modulation.bias", "generator.generator.convs.5.noise.weight", "generator.generator.convs.5.activate.bias", "generator.generator.convs.6.conv.weight", "generator.generator.convs.6.conv.blur.kernel", "generator.generator.convs.6.conv.modulation.weight", "generator.generator.convs.6.conv.modulation.bias", "generator.generator.convs.6.noise.weight", "generator.generator.convs.6.activate.bias", "generator.generator.convs.7.conv.weight", "generator.generator.convs.7.conv.modulation.weight", "generator.generator.convs.7.conv.modulation.bias", "generator.generator.convs.7.noise.weight", "generator.generator.convs.7.activate.bias", "generator.generator.convs.8.conv.weight", "generator.generator.convs.8.conv.blur.kernel", "generator.generator.convs.8.conv.modulation.weight", "generator.generator.convs.8.conv.modulation.bias", "generator.generator.convs.8.noise.weight", "generator.generator.convs.8.activate.bias", "generator.generator.convs.9.conv.weight", "generator.generator.convs.9.conv.modulation.weight", "generator.generator.convs.9.conv.modulation.bias", "generator.generator.convs.9.noise.weight", "generator.generator.convs.9.activate.bias", "generator.generator.convs.10.conv.weight", "generator.generator.convs.10.conv.blur.kernel", "generator.generator.convs.10.conv.modulation.weight", "generator.generator.convs.10.conv.modulation.bias", "generator.generator.convs.10.noise.weight", "generator.generator.convs.10.activate.bias", "generator.generator.convs.11.conv.weight", "generator.generator.convs.11.conv.modulation.weight", "generator.generator.convs.11.conv.modulation.bias", "generator.generator.convs.11.noise.weight", "generator.generator.convs.11.activate.bias", "generator.generator.convs.12.conv.weight", "generator.generator.convs.12.conv.blur.kernel", "generator.generator.convs.12.conv.modulation.weight", "generator.generator.convs.12.conv.modulation.bias", "generator.generator.convs.12.noise.weight", "generator.generator.convs.12.activate.bias", "generator.generator.convs.13.conv.weight", "generator.generator.convs.13.conv.modulation.weight", "generator.generator.convs.13.conv.modulation.bias", "generator.generator.convs.13.noise.weight", "generator.generator.convs.13.activate.bias", "generator.generator.convs.14.conv.weight", "generator.generator.convs.14.conv.blur.kernel", "generator.generator.convs.14.conv.modulation.weight", "generator.generator.convs.14.conv.modulation.bias", "generator.generator.convs.14.noise.weight", "generator.generator.convs.14.activate.bias", "generator.generator.convs.15.conv.weight", "generator.generator.convs.15.conv.modulation.weight", "generator.generator.convs.15.conv.modulation.bias", "generator.generator.convs.15.noise.weight", "generator.generator.convs.15.activate.bias", "generator.generator.to_rgbs.0.bias", "generator.generator.to_rgbs.0.upsample.kernel", "generator.generator.to_rgbs.0.conv.weight", "generator.generator.to_rgbs.0.conv.modulation.weight", "generator.generator.to_rgbs.0.conv.modulation.bias", "generator.generator.to_rgbs.1.bias", "generator.generator.to_rgbs.1.upsample.kernel", "generator.generator.to_rgbs.1.conv.weight", "generator.generator.to_rgbs.1.conv.modulation.weight", "generator.generator.to_rgbs.1.conv.modulation.bias", "generator.generator.to_rgbs.2.bias", "generator.generator.to_rgbs.2.upsample.kernel", "generator.generator.to_rgbs.2.conv.weight", "generator.generator.to_rgbs.2.conv.modulation.weight", "generator.generator.to_rgbs.2.conv.modulation.bias", "generator.generator.to_rgbs.3.bias", "generator.generator.to_rgbs.3.upsample.kernel", "generator.generator.to_rgbs.3.conv.weight", "generator.generator.to_rgbs.3.conv.modulation.weight", "generator.generator.to_rgbs.3.conv.modulation.bias", "generator.generator.to_rgbs.4.bias", "generator.generator.to_rgbs.4.upsample.kernel", "generator.generator.to_rgbs.4.conv.weight", "generator.generator.to_rgbs.4.conv.modulation.weight", "generator.generator.to_rgbs.4.conv.modulation.bias", "generator.generator.to_rgbs.5.bias", "generator.generator.to_rgbs.5.upsample.kernel", "generator.generator.to_rgbs.5.conv.weight", "generator.generator.to_rgbs.5.conv.modulation.weight", "generator.generator.to_rgbs.5.conv.modulation.bias", "generator.generator.to_rgbs.6.bias", "generator.generator.to_rgbs.6.upsample.kernel", "generator.generator.to_rgbs.6.conv.weight", "generator.generator.to_rgbs.6.conv.modulation.weight", "generator.generator.to_rgbs.6.conv.modulation.bias", "generator.generator.to_rgbs.7.bias", "generator.generator.to_rgbs.7.upsample.kernel", "generator.generator.to_rgbs.7.conv.weight", "generator.generator.to_rgbs.7.conv.modulation.weight", "generator.generator.to_rgbs.7.conv.modulation.bias", "generator.generator.noises.noise_0", "generator.generator.noises.noise_1", "generator.generator.noises.noise_2", "generator.generator.noises.noise_3", "generator.generator.noises.noise_4", "generator.generator.noises.noise_5", "generator.generator.noises.noise_6", "generator.generator.noises.noise_7", "generator.generator.noises.noise_8", "generator.generator.noises.noise_9", "generator.generator.noises.noise_10", "generator.generator.noises.noise_11", "generator.generator.noises.noise_12", "generator.generator.noises.noise_13", "generator.generator.noises.noise_14", "generator.generator.noises.noise_15", "generator.generator.noises.noise_16", "generator.res.0.conv.0.weight", "generator.res.0.conv.1.bias", "generator.res.0.conv2.0.weight", "generator.res.0.conv2.1.bias", "generator.res.0.norm.style.weight", "generator.res.0.norm.style.bias", "generator.res.0.norm2.style.weight", "generator.res.0.norm2.style.bias", "generator.res.1.conv.0.weight", "generator.res.1.conv.1.bias", "generator.res.1.conv2.0.weight", "generator.res.1.conv2.1.bias", "generator.res.1.norm.style.weight", "generator.res.1.norm.style.bias", "generator.res.1.norm2.style.weight", "generator.res.1.norm2.style.bias", "generator.res.2.conv.0.weight", "generator.res.2.conv.1.bias", "generator.res.2.conv2.0.weight", "generator.res.2.conv2.1.bias", "generator.res.2.norm.style.weight", "generator.res.2.norm.style.bias", "generator.res.2.norm2.style.weight", "generator.res.2.norm2.style.bias", "generator.res.3.conv.0.weight", "generator.res.3.conv.1.bias", "generator.res.3.conv2.0.weight", "generator.res.3.conv2.1.bias", "generator.res.3.norm.style.weight", "generator.res.3.norm.style.bias", "generator.res.3.norm2.style.weight", "generator.res.3.norm2.style.bias", "generator.res.4.conv.0.weight", "generator.res.4.conv.1.bias", "generator.res.4.conv2.0.weight", "generator.res.4.conv2.1.bias", "generator.res.4.norm.style.weight", "generator.res.4.norm.style.bias", "generator.res.4.norm2.style.weight", "generator.res.4.norm2.style.bias", "generator.res.5.conv.0.weight", "generator.res.5.conv.1.bias", "generator.res.5.conv2.0.weight", "generator.res.5.conv2.1.bias", "generator.res.5.norm.style.weight", "generator.res.5.norm.style.bias", "generator.res.5.norm2.style.weight", "generator.res.5.norm2.style.bias", "generator.res.6.conv.0.weight", "generator.res.6.conv.1.bias", "generator.res.6.conv2.0.weight", "generator.res.6.conv2.1.bias", "generator.res.6.norm.style.weight", "generator.res.6.norm.style.bias", "generator.res.6.norm2.style.weight", "generator.res.6.norm2.style.bias", "generator.res.7.weight", "generator.res.7.bias", "generator.res.8.weight", "generator.res.8.bias", "generator.res.9.weight", "generator.res.9.bias", "generator.res.10.weight", "generator.res.10.bias", "generator.res.11.weight", "generator.res.11.bias", "generator.res.12.weight", "generator.res.12.bias", "generator.res.13.weight", "generator.res.13.bias", "generator.res.14.weight", "generator.res.14.bias", "generator.res.15.weight", "generator.res.15.bias", "generator.res.16.weight", "generator.res.16.bias", "generator.res.17.weight", "generator.res.17.bias", "fusion_out.0.conv.weight", "fusion_out.0.conv.bias", "fusion_out.0.norm.style.weight", "fusion_out.0.norm.style.bias", "fusion_out.0.conv2.weight", "fusion_out.0.conv2.bias", "fusion_out.0.linear.0.weight", "fusion_out.0.linear.0.bias", "fusion_out.0.linear.2.weight", "fusion_out.0.linear.2.bias", "fusion_out.1.conv.weight", "fusion_out.1.conv.bias", "fusion_out.1.norm.style.weight", "fusion_out.1.norm.style.bias", "fusion_out.1.conv2.weight", "fusion_out.1.conv2.bias", "fusion_out.1.linear.0.weight", "fusion_out.1.linear.0.bias", "fusion_out.1.linear.2.weight", "fusion_out.1.linear.2.bias", "fusion_out.2.conv.weight", "fusion_out.2.conv.bias", "fusion_out.2.norm.style.weight", "fusion_out.2.norm.style.bias", "fusion_out.2.conv2.weight", "fusion_out.2.conv2.bias", "fusion_out.2.linear.0.weight", "fusion_out.2.linear.0.bias", "fusion_out.2.linear.2.weight", "fusion_out.2.linear.2.bias", "fusion_out.3.conv.weight", "fusion_out.3.conv.bias", "fusion_out.3.norm.style.weight", "fusion_out.3.norm.style.bias", "fusion_out.3.conv2.weight", "fusion_out.3.conv2.bias", "fusion_out.3.linear.0.weight", "fusion_out.3.linear.0.bias", "fusion_out.3.linear.2.weight", "fusion_out.3.linear.2.bias", "res.0.conv.0.weight", "res.0.conv.1.bias", "res.0.conv2.0.weight", "res.0.conv2.1.bias", "res.0.norm.style.weight", "res.0.norm.style.bias", "res.0.norm2.style.weight", "res.0.norm2.style.bias", "res.1.conv.0.weight", "res.1.conv.1.bias", "res.1.conv2.0.weight", "res.1.conv2.1.bias", "res.1.norm.style.weight", "res.1.norm.style.bias", "res.1.norm2.style.weight", "res.1.norm2.style.bias", "res.2.conv.0.weight", "res.2.conv.1.bias", "res.2.conv2.0.weight", "res.2.conv2.1.bias", "res.2.norm.style.weight", "res.2.norm.style.bias", "res.2.norm2.style.weight", "res.2.norm2.style.bias", "res.3.conv.0.weight", "res.3.conv.1.bias", "res.3.conv2.0.weight", "res.3.conv2.1.bias", "res.3.norm.style.weight", "res.3.norm.style.bias", "res.3.norm2.style.weight", "res.3.norm2.style.bias", "res.4.conv.0.weight", "res.4.conv.1.bias", "res.4.conv2.0.weight", "res.4.conv2.1.bias", "res.4.norm.style.weight", "res.4.norm.style.bias", "res.4.norm2.style.weight", "res.4.norm2.style.bias", "res.5.conv.0.weight", "res.5.conv.1.bias", "res.5.conv2.0.weight", "res.5.conv2.1.bias", "res.5.norm.style.weight", "res.5.norm.style.bias", "res.5.norm2.style.weight", "res.5.norm2.style.bias", "res.6.conv.0.weight", "res.6.conv.1.bias", "res.6.conv2.0.weight", "res.6.conv2.1.bias", "res.6.norm.style.weight", "res.6.norm.style.bias", "res.6.norm2.style.weight", "res.6.norm2.style.bias".
Unexpected key(s) in state_dict: "generator.input.input", "generator.conv1.conv.weight", "generator.conv1.conv.modulation.weight", "generator.conv1.conv.modulation.bias", "generator.conv1.noise.weight", "generator.conv1.activate.bias", "generator.to_rgb1.bias", "generator.to_rgb1.conv.weight", "generator.to_rgb1.conv.modulation.weight", "generator.to_rgb1.conv.modulation.bias", "generator.convs.0.conv.weight", "generator.convs.0.conv.blur.kernel", "generator.convs.0.conv.modulation.weight", "generator.convs.0.conv.modulation.bias", "generator.convs.0.noise.weight", "generator.convs.0.activate.bias", "generator.convs.1.conv.weight", "generator.convs.1.conv.modulation.weight", "generator.convs.1.conv.modulation.bias", "generator.convs.1.noise.weight", "generator.convs.1.activate.bias", "generator.convs.2.conv.weight", "generator.convs.2.conv.blur.kernel", "generator.convs.2.conv.modulation.weight", "generator.convs.2.conv.modulation.bias", "generator.convs.2.noise.weight", "generator.convs.2.activate.bias", "generator.convs.3.conv.weight", "generator.convs.3.conv.modulation.weight", "generator.convs.3.conv.modulation.bias", "generator.convs.3.noise.weight", "generator.convs.3.activate.bias", "generator.convs.4.conv.weight", "generator.convs.4.conv.blur.kernel", "generator.convs.4.conv.modulation.weight", "generator.convs.4.conv.modulation.bias", "generator.convs.4.noise.weight", "generator.convs.4.activate.bias", "generator.convs.5.conv.weight", "generator.convs.5.conv.modulation.weight", "generator.convs.5.conv.modulation.bias", "generator.convs.5.noise.weight", "generator.convs.5.activate.bias", "generator.convs.6.conv.weight", "generator.convs.6.conv.blur.kernel", "generator.convs.6.conv.modulation.weight", "generator.convs.6.conv.modulation.bias", "generator.convs.6.noise.weight", "generator.convs.6.activate.bias", "generator.convs.7.conv.weight", "generator.convs.7.conv.modulation.weight", "generator.convs.7.conv.modulation.bias", "generator.convs.7.noise.weight", "generator.convs.7.activate.bias", "generator.convs.8.conv.weight", "generator.convs.8.conv.blur.kernel", "generator.convs.8.conv.modulation.weight", "generator.convs.8.conv.modulation.bias", "generator.convs.8.noise.weight", "generator.convs.8.activate.bias", "generator.convs.9.conv.weight", "generator.convs.9.conv.modulation.weight", "generator.convs.9.conv.modulation.bias", "generator.convs.9.noise.weight", "generator.convs.9.activate.bias", "generator.convs.10.conv.weight", "generator.convs.10.conv.blur.kernel", "generator.convs.10.conv.modulation.weight", "generator.convs.10.conv.modulation.bias", "generator.convs.10.noise.weight", "generator.convs.10.activate.bias", "generator.convs.11.conv.weight", "generator.convs.11.conv.modulation.weight", "generator.convs.11.conv.modulation.bias", "generator.convs.11.noise.weight", "generator.convs.11.activate.bias", "generator.convs.12.conv.weight", "generator.convs.12.conv.blur.kernel", "generator.convs.12.conv.modulation.weight", "generator.convs.12.conv.modulation.bias", "generator.convs.12.noise.weight", "generator.convs.12.activate.bias", "generator.convs.13.conv.weight", "generator.convs.13.conv.modulation.weight", "generator.convs.13.conv.modulation.bias", "generator.convs.13.noise.weight", "generator.convs.13.activate.bias", "generator.convs.14.conv.weight", "generator.convs.14.conv.blur.kernel", "generator.convs.14.conv.modulation.weight", "generator.convs.14.conv.modulation.bias", "generator.convs.14.noise.weight", "generator.convs.14.activate.bias", "generator.convs.15.conv.weight", "generator.convs.15.conv.modulation.weight", "generator.convs.15.conv.modulation.bias", "generator.convs.15.noise.weight", "generator.convs.15.activate.bias", "generator.to_rgbs.0.bias", "generator.to_rgbs.0.upsample.kernel", "generator.to_rgbs.0.conv.weight", "generator.to_rgbs.0.conv.modulation.weight", "generator.to_rgbs.0.conv.modulation.bias", "generator.to_rgbs.1.bias", "generator.to_rgbs.1.upsample.kernel", "generator.to_rgbs.1.conv.weight", "generator.to_rgbs.1.conv.modulation.weight", "generator.to_rgbs.1.conv.modulation.bias", "generator.to_rgbs.2.bias", "generator.to_rgbs.2.upsample.kernel", "generator.to_rgbs.2.conv.weight", "generator.to_rgbs.2.conv.modulation.weight", "generator.to_rgbs.2.conv.modulation.bias", "generator.to_rgbs.3.bias", "generator.to_rgbs.3.upsample.kernel", "generator.to_rgbs.3.conv.weight", "generator.to_rgbs.3.conv.modulation.weight", "generator.to_rgbs.3.conv.modulation.bias", "generator.to_rgbs.4.bias", "generator.to_rgbs.4.upsample.kernel", "generator.to_rgbs.4.conv.weight", "generator.to_rgbs.4.conv.modulation.weight", "generator.to_rgbs.4.conv.modulation.bias", "generator.to_rgbs.5.bias", "generator.to_rgbs.5.upsample.kernel", "generator.to_rgbs.5.conv.weight", "generator.to_rgbs.5.conv.modulation.weight", "generator.to_rgbs.5.conv.modulation.bias", "generator.to_rgbs.6.bias", "generator.to_rgbs.6.upsample.kernel", "generator.to_rgbs.6.conv.weight", "generator.to_rgbs.6.conv.modulation.weight", "generator.to_rgbs.6.conv.modulation.bias", "generator.to_rgbs.7.bias", "generator.to_rgbs.7.upsample.kernel", "generator.to_rgbs.7.conv.weight", "generator.to_rgbs.7.conv.modulation.weight", "generator.to_rgbs.7.conv.modulation.bias", "generator.noises.noise_0", "generator.noises.noise_1", "generator.noises.noise_2", "generator.noises.noise_3", "generator.noises.noise_4", "generator.noises.noise_5", "generator.noises.noise_6", "generator.noises.noise_7", "generator.noises.noise_8", "generator.noises.noise_9", "generator.noises.noise_10", "generator.noises.noise_11", "generator.noises.noise_12", "generator.noises.noise_13", "generator.noises.noise_14", "generator.noises.noise_15", "generator.noises.noise_16", "generator.style.3.weight", "generator.style.3.bias", "generator.style.4.weight", "generator.style.4.bias", "generator.style.5.weight", "generator.style.5.bias", "generator.style.6.weight", "generator.style.6.bias", "generator.style.7.weight", "generator.style.7.bias", "generator.style.8.weight", "generator.style.8.bias", "fusion_out.0.weight", "fusion_out.0.bias", "fusion_out.1.weight", "fusion_out.1.bias", "fusion_out.2.weight", "fusion_out.2.bias", "fusion_out.3.weight", "fusion_out.3.bias".