n00mkrad / cupscale

Image Upscaling GUI based on ESRGAN
MIT License
2.11k stars 112 forks source link

KeyError: 'model.0.weight' #159

Open Eliya-Shalom opened 10 months ago

Eliya-Shalom commented 10 months ago

I'm trying to convert RealESRNet_x4plus.pth to 'ncnn' using the 'pth2ncnn' tool, but It fails will KeyError: 'model.0.weight'.

Windows machine, Powershell

Here is the full log:

PS E:\Downloads\Cupscale.1.39.0f1\Cupscale 1.39.0f1\CupscaleData\bin\pth2ncnn> .\pth2ncnn.exe .\RealESRGAN_x4plus.pth Loading model Traceback (most recent call last): File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 193, in _run_module_as_main File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 85, in _run_code File "E:\Downloads\Cupscale.1.39.0f1\Cupscale 1.39.0f1\CupscaleData\bin\pth2ncnn\pth2ncnn.exe\__main__.py", line 440, in <module> File "E:\Downloads\Cupscale.1.39.0f1\Cupscale 1.39.0f1\CupscaleData\bin\pth2ncnn\pth2ncnn.exe\__main__.py", line 361, in main KeyError: 'model.0.weight' PS E:\Downloads\Cupscale.1.39.0f1\Cupscale 1.39.0f1\CupscaleData\bin\pth2ncnn>

Thanks :)