Open mxmlnkn opened 7 years ago
Use -model_dir
option.
# in .zshrc or something
WAIFU2X_DIR=~/dev/waifu2x
waifu2x()
{
th ${WAIFU2X_DIR}/waifu2x.lua -model_dir ${WAIFU2X_DIR}/models/anime_style_art_rgb $@
}
waifu2x_photo()
{
th ${WAIFU2X_DIR}/waifu2x.lua -model_dir ${WAIFU2X_DIR}/models/photo $@
}
Example
waifu2x -i in.png -o out.png
waifu2x_photo -m noise -noise_level 3 -i in.png -o out.png
Ah, thank you, that works.
So I would want to be able to call waifu2x from arbitrary locations, but when trying:
e.g. in my home directory, I get:
It seems like waifu2x searches for libraries relative to the calling path, not the binary path. Currently I'm using the following script as a hack for this: