Djdefrag / QualityScaler

QualityScaler - image/video AI upscaler app
MIT License
2.11k stars 156 forks source link

[BUG] Unable to load state_dict for RealSRx4_Anime #52

Closed bkersbergen closed 1 year ago

bkersbergen commented 1 year ago

Describe the bug Unable to load state_dict for RealSRx4_Anime for upscaling a video in QualityScaler 2.9.

To Reproduce

  1. choose a video
  2. choose AI model: 'RealSRx4_Anime'

Expected behavior The Upscaler will load the trained model and start upscaling the video. The other models do work, the issue is only for this specific model.

Error `> Uploaded files: 1 => Supported files: 1

Starting upscale: Files to upscale: 1 Selected AI model: RealSRx4_Anime AI half precision: True Interpolation: True Selected GPU: NVIDIA GeForce RTX 3060 Selected image output extension: .png Selected video output extension: .mp4 (x264) Tiles resolution for selected GPU VRAM: 1440x1440px Resize factor: 50% Cpu number: 10

Loading AI model Error during upscale process Error(s) in loading state_dict for SRVGGNetCompact: Missing key(s) in state_dict: "body.35.weight", "body.36.weight", "body.36.bias", "body.37.weight", "body.38.weight", "body.38.bias", "body.39.weight", "body.40.weight", "body.40.bias", "body.41.weight", "body.42.weight", "body.42.bias", "body.43.weight", "body.44.weight", "body.44.bias", "body.45.weight", "body.46.weight", "body.46.bias", "body.47.weight", "body.48.weight", "body.48.bias", "body.49.weight", "body.50.weight", "body.50.bias", "body.51.weight", "body.52.weight", "body.52.bias", "body.53.weight", "body.54.weight", "body.54.bias", "body.55.weight", "body.56.weight", "body.56.bias", "body.57.weight", "body.58.weight", "body.58.bias", "body.59.weight", "body.60.weight", "body.60.bias", "body.61.weight", "body.62.weight", "body.62.bias", "body.63.weight", "body.64.weight", "body.64.bias", "body.65.weight", "body.66.weight", "body.66.bias". size mismatch for body.34.weight: copying a param with shape torch.Size([48, 64, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]). size mismatch for body.34.bias: copying a param with shape torch.Size([48]) from checkpoint, the shape in current model is torch.Size([64]). `

Desktop (please complete the following information):

Djdefrag commented 1 year ago

Hi my friend, thank you for the feedback.

There is a little error for RealSRx4_Anime, it will be fixed in next release :)

bkersbergen commented 1 year ago

The Steam version of QualityScaler is updated to 2.10 and the Anime model works. Thanks for the quick fix!