nagadomi / waifu2x

Image Super-Resolution for Anime-Style Art
http://waifu2x.udp.jp/
MIT License
27.57k stars 2.71k forks source link

I have no idea how to fix this #326

Closed alexacallmebaka closed 4 years ago

alexacallmebaka commented 4 years ago

Trying to run th waifu2x.lua THCudaCheck FAIL file=/home/jhurd/torch/extra/cutorch/lib/THC/generic/THCStorage.cu line=66 error=2 : out of memory /home/jhurd/torch/install/bin/luajit: /home/jhurd/torch/install/share/lua/5.1/nn/Container.lua:67: In 2 module of nn.Sequential: In 1 module of nn.ConcatTable: In 5 module of nn.Sequential: /home/jhurd/torch/install/share/lua/5.1/nn/THNN.lua:110: cuda runtime error (2) : out of memory at /home/jhurd/torch/extra/cutorch/lib/THC/generic/THCStorage.cu:66 stack traceback: [C]: in function 'v' /home/jhurd/torch/install/share/lua/5.1/nn/THNN.lua:110: in function 'SpatialConvolutionMM_updateOutput' .../torch/install/share/lua/5.1/nn/SpatialConvolutionMM.lua:63: in function <.../torch/install/share/lua/5.1/nn/SpatialConvolutionMM.lua:53> [C]: in function 'xpcall' /home/jhurd/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors' /home/jhurd/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function </home/jhurd/torch/install/share/lua/5.1/nn/Sequential.lua:41> [C]: in function 'xpcall' /home/jhurd/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors' /home/jhurd/torch/install/share/lua/5.1/nn/ConcatTable.lua:11: in function </home/jhurd/torch/install/share/lua/5.1/nn/ConcatTable.lua:9> [C]: in function 'xpcall' /home/jhurd/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors' /home/jhurd/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward' lib/reconstruct.lua:52: in function 'reconstruct_nn' lib/reconstruct.lua:200: in function 'scale_rgb' lib/reconstruct.lua:240: in function 'scale_f' waifu2x.lua:99: in function 'convert_image' waifu2x.lua:294: in function 'waifu2x' waifu2x.lua:299: in main chunk [C]: in function 'dofile' ...hurd/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x5632a84d7570

WARNING: If you see a stack trace below, it doesn't point to the place where this error occurred. Please use only the one above. stack traceback: [C]: in function 'error' /home/jhurd/torch/install/share/lua/5.1/nn/Container.lua:67: in function 'rethrowErrors' /home/jhurd/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward' lib/reconstruct.lua:52: in function 'reconstruct_nn' lib/reconstruct.lua:200: in function 'scale_rgb' lib/reconstruct.lua:240: in function 'scale_f' waifu2x.lua:99: in function 'convert_image' waifu2x.lua:294: in function 'waifu2x' waifu2x.lua:299: in main chunk [C]: in function 'dofile' ...hurd/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x5632a84d7570

nagadomi commented 4 years ago

out of memory

It is out of memory error on GPU. Use -crop_size 128 option to reduce memory usage. or buy high-end GPU.

alexacallmebaka commented 4 years ago

This fixed my last issue. Thank you for being so quick to respond.