n00mkrad / cupscale

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

Failed to convert onnx to ncnn #158

Open starkgate opened 1 year ago

starkgate commented 1 year ago

Hi, I have an AMD GPU and am trying to run a model with the "RealESRGAN (NCNN)" network. During the conversion of the model to NCNN format, I see the following error. Any idea how to fix this?

[NcnnUtils] Model Converter Output: Error: Failed to convert onnx to ncnn
Failed to convert Pytorch model to NCNN format! It might be incompatible.

Error: Failed to convert onnx to ncnn

Stack Trace:
   at Cupscale.OS.NcnnUtils.<ConvertNcnnModel>d__6.MoveNext()
[ESRGAN] NCNN Model is ready: 
Failed to get NCNN model scale for dir '': Value cannot be null.
Parameter name: path
Failed to parse "auto" to int: Input string was not in a correct format.
[CMD] /C cd /D "E:\ALOT\Cupscale1.37.0\CupscaleData\bin\realesrgan-ncnn" & realesrgan-ncnn-vulkan.exe -i "E:\ALOT\Cupscale1.37.0\CupscaleData\preview" -o "E:\ALOT\Cupscale1.37.0\CupscaleData\preview-out" -g 0 -m "" -n esrgan-x4 -s 4  
[NCNN] unknown model dir type
[ESRGAN] Upscaling Error: Index was outside the bounds of the array.
   at Cupscale.PreviewMerger.Merge()
   at Cupscale.Main.Upscale.<Run>d__8.MoveNext()