ai-forever / Real-ESRGAN

PyTorch implementation of Real-ESRGAN model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RealESRGAN_x8.pth creating issue

air55555 opened this issue · comments

I tried to test RealESRGAN_x8.pth model via your colab notebook. Got an error-

RuntimeError Traceback (most recent call last)
in ()
9
10 model = RealESRGAN(device, scale=4)
---> 11 model.load_weights('weights/RealESRGAN_x8.pth')

1 frames
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict)
1496 if len(error_msgs) > 0:
1497 raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
-> 1498 self.class.name, "\n\t".join(error_msgs)))
1499 return _IncompatibleKeys(missing_keys, unexpected_keys)
1500

RuntimeError: Error(s) in loading state_dict for RRDBNet:
Unexpected key(s) in state_dict: "conv_up3.weight", "conv_up3.bias".

Hi,
Change scale parameter to 8 when creating the model in the line above. It should be:
model = RealESRGAN(device, scale=8)

Closed, working with model = RealESRGAN(device, scale=8) params