xinntao / Real-ESRGAN-ncnn-vulkan

NCNN implementation of Real-ESRGAN. Real-ESRGAN aims at developing Practical Algorithms for General Image Restoration.
https://github.com/xinntao/Real-ESRGAN
Other
1.42k stars 170 forks source link

How to convert fintuned RealESRGAN_x4plus pytorch pth file into ncnn-vulkan weight file #51

Open dumppool opened 11 months ago

dumppool commented 11 months ago

How to config *.param file and convert fintuned RealESRGAN_x4plus model file into bin file,so that the Real-ESRGAN-ncnn-vulkan can use customized model file.

HongYue1 commented 11 months ago

There is pth2ncnn.exe in cubscale but sadly it's not working anymore, I have been searching for an already converted models, but no luck.

Baschbox commented 9 months ago

I use cupscale for that, just throw the .pth in it and try to upscale something and it will throw a error message. Ignore that and go to cupscale Data -> Models. The .bin and .param will be there. It doesnt work with any models, but most of the time it does. I dont know why, i dont have the know how provided to answer that, but it does the job. But i use the "Cupscale - updated - cpuonly FORK" not the original one.

E: Found a guide to convert .pth into ncnn compatible files using chainner: https://github.com/upscayl/upscayl/wiki/%F0%9F%96%A5%EF%B8%8F-Model-Conversion-%E2%80%90-Create-more-AI-models! Should work according to a few users