hasn't been working for me, this works fine though (and is in chaotic-aur!) https://aur.archlinux.org/packages/waifu2x-ncnn-vulkan/
![]() |
VOOZH | about |
| Git Clone URL: | https://aur.archlinux.org/waifu2x-git.git (read-only, click to copy) |
|---|---|
| Package Base: | waifu2x-git |
| Description: | Image rescaling and noise reduction using the power of convolutional neural networks |
| Upstream URL: | https://github.com/nagadomi/waifu2x |
| Licenses: | MIT |
| Conflicts: | waifu2x |
| Provides: | waifu2x |
| Submitter: | fbrennan |
| Maintainer: | eclairevoyant |
| Last Packager: | chrhasse |
| Votes: | 13 |
| Popularity: | 0.000000 |
| First Submitted: | 2015-09-22 13:01 (UTC) |
| Last Updated: | 2019-02-03 07:38 (UTC) |
hasn't been working for me, this works fine though (and is in chaotic-aur!) https://aur.archlinux.org/packages/waifu2x-ncnn-vulkan/
Oh, I see, thanks!
tannisroot: It seems like you're trying to run a command like waifu2x -m scale -scale 4 -i <somefile> -o <somefile>. The only included scaling model is for 2x scaling, so try running -scale 2 or leaving -scale out altogether. If you want to scale by 4x, try running it through twice.
Hi, I've just installed it using yay and for some reason it doesn't work :(
luajit: cannot open </usr/share/waifu2x/models/cunet/art/scale4.0x_model.t7> in mode r at /home/alex/.cache/yay/torch7-git/src/torch7-git/lib/TH/THDiskFile.c:673
stack traceback:
[C]: at 0x7fa88b42e370
[C]: in function 'DiskFile'
/usr/share/lua/5.1/torch/File.lua:405: in function 'load'
/usr/share/waifu2x/lib/w2nn.lua: in function 'load_model'
/usr/share/waifu2x/waifu2x.lua: in function ''
/usr/share/waifu2x/waifu2x.lua: in function </usr/share/waifu2x/waifu2x.lua:0>
/usr/share/waifu2x/waifu2x.lua: in function </usr/share/waifu2x/waifu2x.lua:0>
[C]: at 0x564cbabdbc00
Any ideas on what I might be doing wrong? At first I noticed that the file in .cache that it looks for doesn't exist because src gets deleted but even after I added that back it still fails.
fbrennan: For some reason your luajit is looking in /usr/local/share instead of /usr/share. Have you modified the LUA_PATH environment variable? I can try building it in a clean chroot tomorrow to see if I can reproduce the error.
try running env -u LUA_PATH waifu2x -h and see if that works.
Edit: I tested building and running in a chroot and it behaves as expected. It almost seems like you tried installing it manually and are sourcing torch-activate in your shell config.
I receive this error:
[fred@pc ~]$ waifu2x -h
luajit: /usr/share/waifu2x/lib/iproc.lua:0: module 'graphicsmagick.Image' not found:
no field package.preload['graphicsmagick.Image']
no file '/usr/share/waifu2x/lib/graphicsmagick/Image.lua'
no file '/home/fred/.luarocks/share/lua/5.1/graphicsmagick/Image.lua'
no file '/home/fred/.luarocks/share/lua/5.1/graphicsmagick/Image/init.lua'
no file '/home/fred/Workspace/torch/distro/install/share/lua/5.1/graphicsmagick/Image.lua'
no file '/home/fred/Workspace/torch/distro/install/share/lua/5.1/graphicsmagick/Image/init.lua'
no file './graphicsmagick/Image.lua'
no file '/home/fred/Workspace/torch/distro/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 '/home/fred/Workspace/torch/distro/install/lib/graphicsmagick/Image.so'
no file '/home/fred/.luarocks/lib/lua/5.1/graphicsmagick/Image.so'
no file '/home/fred/Workspace/torch/distro/install/lib/lua/5.1/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 '/home/fred/Workspace/torch/distro/install/lib/graphicsmagick.so'
no file '/home/fred/.luarocks/lib/lua/5.1/graphicsmagick.so'
no file '/home/fred/Workspace/torch/distro/install/lib/lua/5.1/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 'require'
/usr/share/waifu2x/lib/iproc.lua: in function </usr/share/waifu2x/lib/iproc.lua:0>
[C]: in function 'require'
/usr/share/waifu2x/waifu2x.lua: in function </usr/share/waifu2x/waifu2x.lua:0>
[C]: at 0x5647f298ae40
Ok the package should compile now. The new models use a lot of memory, so if you run into out of memory issues try using the -crop_size option or installing the optional cudnn dependency with -force_cudnn 1
Current version fails to compile when patching, but the fix seems to be simple. In 0001-Use-absolute-path-to-models-directory.patch, in waifu2x.lua, change the "/models/upconv_7/art" part of the both paths in the line being modified to "/models/cunet/art". I don't know what exactly changing the directory entails, but I'm going off of what the original code seems to have changed there since the last time that patch was updated for it.
Cannot compile successfully with encountering this problem:
Can't install because torch7-cunn-git requires gcc54, which is not available anymore.
==> Error: Could not find all required packages: gcc54 (Wanted by: waifu2x-git -> torch7-cunn-git)
After trying again a few times (not sure what I changed exactly) I don't get this error anymore, but I could not compile torch7-cutorch-git unless I installed gcc5.
Fortunately, I found gcc-4.9 on the manjaro repos and used that to compile torch7-cutorch.
Alternatively, one could use the gcc shipped with cuda in /opt/cuda/bin/gcc I guess...
After all the trouble of compiling these deps, it works fine.