I used Real-ESRGAN on Google Colab and wanted to enlarge the image 16x.
I tried the tile option, but it inevitably crashed in the process.
I examined the code and found that the paste_faces_to_input_image in facexlib's face_restoration_helper.py was allocating a huge amount of memory.
So I thought of offloading memory usage on storage and implemented it using numpy's memmap and numexpr.
This greatly reduced the memory consumption and made it possible to zoom in 16x on the image with Google Colab.
Would you like to incorporate this feature if you like?
I used Real-ESRGAN on Google Colab and wanted to enlarge the image 16x. I tried the tile option, but it inevitably crashed in the process. I examined the code and found that the paste_faces_to_input_image in facexlib's face_restoration_helper.py was allocating a huge amount of memory. So I thought of offloading memory usage on storage and implemented it using numpy's memmap and numexpr. This greatly reduced the memory consumption and made it possible to zoom in 16x on the image with Google Colab.
Would you like to incorporate this feature if you like?