Open mikebilly opened 2 years ago
Hi @nagadomi , I tried to upscale a 2720x1920 picture with these output settings -p cudnn -m noise_scale -n 3 -s 8 -t 1 -i
but I got this output:
tcmalloc: large alloc 4010811392 bytes == 0x55db15804000 @ 0x7f28ceaf11e7 0x7f28cc497382 0x7f28cc59621b 0x55da05ce6afb 0x55da05ce688c 0x55da05ce51cf 0x55da05d1ef73 0x55da05d1eb47 0x55da05d1e016 0x55da05d1dbf5 0x55da05d1caf7 0x55da05cc5e2e 0x7f28cb75abf7 0x55da05cc13ca
tcmalloc: large alloc 4010811392 bytes == 0x55dc097ba000 @ 0x7f28ceaf11e7 0x7f28cc497382 0x7f28cc59621b 0x55da05ce6afb 0x55da05ce688c 0x55da05ce51cf 0x55da05d1ef73 0x55da05d1eb47 0x55da05d1e016 0x55da05d1dbf5 0x55da05d1caf7 0x55da05cc5e2e 0x7f28cb75abf7 0x55da05cc13ca
tcmalloc: large alloc 4010811392 bytes == 0x55dcf88bc000 @ 0x7f28ceaf11e7 0x7f28cc497382 0x7f28cc59621b 0x7f28cc5b46e5 0x7f28cc5b6113 0x55da05d1e799 0x55da05d1e8b6 0x55da05d1ec07 0x55da05d1e016 0x55da05d1dbf5 0x55da05d1caf7 0x55da05cc5e2e 0x7f28cb75abf7 0x55da05cc13ca
and it didn't create output picture. However, waifu2x-ncnn-vulkan managed to upscale 2080x1318 and 2130x1500 pictures without any error, using the same output settings. (Both waifu2x-caffe and waifu2x-ncnn-vulkan ran on Google Colab with GPU accelerator)
Edit: this is before it stops upscaling I will try to upscale that 2720x1920 picture with waifu2x-ncnn-vulkan to see if it will succeed.
I am not the author of waifu2x-caffe. It depends on the manner in which the resources are used in the program.
8x 2720x1920 is 21760x15360x3channels,
minimum memory requirements = 21760*15360*3*sizeof(float) = 4010803200 = about 4GB
If the program uses three copies of the temporary image, it will result in an out of memory error.
I think it's not designed to handle such huge images with 12GB RAM.
it's because I used tta mode right? is there a way to make it keep only 1 copy of the temporary image
. And by the way is it possible to use waifu2x on google colab?, not waifu2x-caffe, but waifu2x?
Update: waifu2x-ncnn-vulkan successfully upscaled that 2720x1920, 8x, with those output settings, taking around 1 hour and 10 minutes and using up only 2.8gb ram. I'm a bit disappointed in waifu2x-caffe
I went through so much trouble trying to make waifu2x-caffe work on Google Colab, but I'm finally done! This took me a week to code from scratch, as I don't know the first thing about Linux or Ubuntu,... I had to search everywhere for the errors. It feels awesome when it's complete and working!, so I decided to share the notebook with you! That waifu2x-caffe on Google Colab is able to utilize cuDNN and Cuda!
Most of the code was copied from many sources, so A LOT of the commands might be redundant. It would be great if you could help me remove all the unnecessary commands and modify the code so it works better and is updated.
Thank you @nagadomi for your quick support on my previous issue at https://github.com/nagadomi/waifu2x-caffe-ubuntu/issues/9. Thank you @sjscotti for your instructive comments at https://github.com/nagadomi/waifu2x-caffe-ubuntu/issues/3, and @ddouglas87 for your detailed guide at https://github.com/k4yt3x/video2x/issues/74#issuecomment-526899181!
The notebook link is: https://colab.research.google.com/drive/1b2Sv0u3eMhXah0De1zlzKPIvgq8aLUTs?usp=sharing You can just copy the blocks of code below and paste them into your new notebook!
Installation, building,...
Done!, the following code upscales your picture (please modify accordingly).
If you want to upload your upscaled picture to your Google Drive, add the following code: