ueshita / waifu2x-converter-glsl

waifu2x converter GPU Optimization in OpenGL Shader
Other
170 stars 37 forks source link

Linux support? #5

Open WuSiYu opened 7 years ago

jeffshee commented 6 years ago

Although it was a 1 year-old post, I will answer this so other Linux user can follow. (I'm a newbie too so might be wrong~ ;-P ) see here: https://github.com/khws4v1/waifu2x-converter-glsl Clone this git then "cmake". This should generate a makefile. After that, launch "make" and you should be able to get the binary file.

Note: If you can't "cmake" successfully, try to ensure that you have all required -devel packages install, copy the error output and try Goggle should be able to tell you which to install. (probably you will need to install: mesa-libGL*-devel freeglut-devel libdrm-devel glew-devel opencv-devel glfw-devel)

If you can't "make" after "cmake" is success, and you get error with something like"pthread......", try to edit the CMakeLists.txt, add this "-lpthread" inside the blanket of target_link_libraries. After that, try to "cmake" and "make" again.

Finally, there is a trick to get this work. Because it requires openGL 3.1 to work, and our driver may not support that. In that case, similar error will show: 0:1(10): error: GLSL 1.40 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES Workaround: launch the binary in this way, MESA_GL_VERSION_OVERRIDE=3.1 ./waifu2x-converter-glsl -i mywaifu.jpg -m noise_scale -j 8 --scale_ratio 1.6 --noise_level 2 Tips for hybrid laptop: Add DRI_PRIME=1 in front to make it use your GPU instead of Intel.

Tested on Fedora 27, work successfully.