xinntao / Real-ESRGAN

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.
BSD 3-Clause "New" or "Revised" License
28.45k stars 3.57k forks source link

keep getting mismatch conv_first weight warning help #806

Open xalteropsx opened 5 months ago

xalteropsx commented 5 months ago

    model2.load_weights(f"weights/RealESRNet_x4plus.pth", download=True)
  File "Z:\software\python11\Lib\site-packages\py_real_esrgan\model.py", line 53, in load_weights
    self.model.load_state_dict(loadnet, strict=True)
  File "Z:\software\python11\Lib\site-packages\torch\nn\modules\module.py", line 2191, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for RRDBNet:
        size mismatch for conv_first.weight: copying a param with shape torch.Size([64, 12, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3]).