nagadomi / waifu2x

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

Doesn't work properly under wsl2 #354

Closed CarbonPool closed 3 years ago

CarbonPool commented 3 years ago

wsl_test I am not sure whether cuda can work normally under wsl2. I should have completed the necessary dependency compilation. This is some error message: Failed to load CUDA modules. Please check the CUDA Settings.

CarbonPool commented 3 years ago

Add some additional information: os: windows10 insider preview 20190 gpu: rtx 2070super gpu driver: 455.41

wsl2: ubuntu 18.04 cuda: cuda-toolkit-10-2

nagadomi commented 3 years ago

I do not have Windows CUDA available. So I can't test it.

module 'cutorch' not found

Maybe when you build distro, CUDA cannot be detected and the library for CUDA is not built. This may help. https://github.com/nagadomi/distro/issues/9#issuecomment-621012212

CarbonPool commented 3 years ago

Thank you, I solved this problem, but I encountered another difficulty, this is the error message: /root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/trepl/init.lua:389: /root/torch/install/share/lua/5.1/trepl/init.lua :389: module'graphicsmagick.Image' not found:No LuaRocks module found for graphicsmagick.Image no field package.preload['graphicsmagick.Image'] no file'lib/graphicsmagick/Image.lua' no file'/root/.luarocks/share/lua/5.1/graphicsmagick/Image.lua' no file'/root/.luarocks/share/lua/5.1/graphicsmagick/Image/init.lua' no file'/root/torch/install/share/lua/5.1/graphicsmagick/Image.lua' no file'/root/torch/install/share/lua/5.1/graphicsmagick/Image/init.lua' no file'./graphicsmagick/Image.lua' no file'/root/torch/install/share/luajit-2.1.0-beta1/graphicsmagick/Image.lua' no file'/usr/local/share/lua/5.1/graphicsmagick/Image.lua' no file'/usr/local/share/lua/5.1/graphicsmagick/Image/init.lua' no file'/root/.luarocks/lib/lua/5.1/graphicsmagick/Image.so' no file'/root/torch/install/lib/lua/5.1/graphicsmagick/Image.so' no file'/root/torch/install/lib/graphicsmagick/Image.so' no file'./graphicsmagick/Image.so' no file'/usr/local/lib/lua/5.1/graphicsmagick/Image.so' no file'/usr/local/lib/lua/5.1/loadall.so' no file'/root/.luarocks/lib/lua/5.1/graphicsmagick.so' no file'/root/torch/install/lib/lua/5.1/graphicsmagick.so' no file'/root/torch/install/lib/graphicsmagick.so' no file'./graphicsmagick.so' no file'/usr/local/lib/lua/5.1/graphicsmagick.so' no file'/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function'error' /root/torch/install/share/lua/5.1/trepl/init.lua:389: in function'require' waifu2x.lua:6: in main chunk [C]: in function'dofile' /root/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x556b2157d570

CarbonPool commented 3 years ago

I made it! After completing the correct cuda configuration, clean up the failed luarocks cache, and then initialize and install the lua dependency module of waifu2x, and execute it in the waifu2x directory: rm -rf ~/.cache/luarocks/ ./install_lua_modules.sh

Training the waifu2 model on Windows Subsystem for Linux 2 is a good solution

nagadomi commented 3 years ago

Thank you for reporting. I didn't expect waifu2x to work with WSL2.