Real-ESRGAN icon indicating copy to clipboard operation
Real-ESRGAN copied to clipboard

I tried custom model to load with executable...

Open zelenooki87 opened this issue 1 year ago • 3 comments

Hi, @xinntao Does windows executable work with custom models? In my case, i tried ncnn converted model(with .bin and .params), but exe throws error. I am 99% sure that model is correctly converted from .pth to torchscript and later with pnnx to ncnn. error I have got: "layer GroupNorm not exists or registered"

Thank you

zelenooki87 avatar Jul 08 '22 11:07 zelenooki87

Hi, have you managed to make the executable work with a custom model?

GruNyv avatar Jul 21 '22 06:07 GruNyv

Hi, I got it working when using the python script to convert from pth to onnx and then convert the onnx model to ncnn using the web-based model converter convertmodel.com. Remember to swap out the names with data and output in the final params file.

GruNyv avatar Jul 28 '22 08:07 GruNyv

Hi, I got it working when using the python script to convert from pth to onnx and then convert the onnx model to ncnn using the web-based model converter convertmodel.com. Remember to swap out the names with data and output in the final params file.

What should I enter as params?

$ python3 pytorch2onnx.py --input ./models/bsrgan.pth --output . --params bsrgan
usage: pytorch2onnx.py [-h] [--input INPUT] [--output OUTPUT] [--params]
pytorch2onnx.py: error: unrecognized arguments: bsrgan

NayamAmarshe avatar Aug 06 '22 00:08 NayamAmarshe