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.44k stars 173 forks source link

'zsh: segmentation fault' #13

Open antonioaja opened 2 years ago

antonioaja commented 2 years ago

When attempting to upscale an image, about a quarter of the upscale was completed before the shell crashed, giving the above error. The image in question was a 335MB PNG image with a resolution of 15040x11160.

Upon further inspection, this segmentation fault seems to arise from memory mismanagement (i.e. accessing memory not allowed or that does not exist). The machine being used is M1 Pro with 32GB of ram, so memory should not be the limiting factor.

So there seems to be an upper limit on how big of an image can be upscaled. Let me know if you need anymore information.

krummrey commented 2 years ago

Same here, not related to file size. Image size is 256x256. MacBook Pro M1 with 32GB on Monterey 12.4 ./realesrgan-ncnn-vulkan -i image.jpg -o image-out.jpg zsh: segmentation fault

Vestaia commented 2 years ago

This is an issue fixed on waifu2x-ncnn-vulkan. See commit https://github.com/nihui/waifu2x-ncnn-vulkan/commit/7ab564a955c23bcfbdabfe093a1791f5a761cb32#diff-22b8a99a3d030bc9efd435c00c70c6ac57295e9e65397fc3490d4d8bbe471bd5 New executable path detection is needed, works after applying this patch.