Package Details: waifu2x-caffe v1.1.2-2

Git Clone URL: https://aur.archlinux.org/waifu2x-caffe.git (read-only, click to copy)
Package Base: waifu2x-caffe
Description: Image rescaling and noise reduction using the power of convolutional neural networks. Rewritten from the original Waifu2x using Caffe. Compiled with CUDA & cuDNN enabled flags.
Upstream URL: https://github.com/Gin-no-kami/waifu2x-caffe
Licenses: MIT
Conflicts: waifu2x-caffe
Provides: waifu2x-caffe
Submitter: ginnokami
Maintainer: ginnokami
Last Packager: ginnokami
Votes: 3
Popularity: 0.000001
First Submitted: 2021-04-18 23:44 (UTC)
Last Updated: 2024-07-09 20:06 (UTC)

Pinned Comments

ginnokami commented on 2021-04-18 23:47 (UTC)

This package provides the cli version of waifu2x-caffe. A readme for all of the flags is located in /usr/share/docs/waifu2x-caffe/README. The models are located at /usr/share/waifu2x-caffe/models.

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

nx-que commented on 2023-07-29 00:44 (UTC)

It seems there were quite a few breaking changes, here is a working PKGBUILD patch

diff --git a/PKGBUILD b/PKGBUILD
index 462777b..8a0c383 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -24,7 +24,7 @@ depends=(
 makedepends=(
     'git'
     'cmake'
-    'qt5-base'
+    'qt6-base'
 )
 optdepends=()
 provides=('waifu2x-caffe')
@@ -55,15 +55,20 @@ prepare() {
     cd "${srcdir}/waifu2x-caffe"
     git submodule update --init --recursive

-    # Change Source.cpp to update the model file location
-    sed -i 's+models/cunet+/usr/share/waifu2x-caffe/models/cunet+g' waifu2x-caffe/Source.cpp
-    
     # create symlink to caffe
     ln -sf ../caffe ./caffe
     ln -sf ../caffe ./libcaffe

+    # compile targets under C++17
+    sed -i 's~-std=c++14~-std=c++17~g' CMakeLists.txt
+    sed -i 's~-std=c++14~-std=c++17~g' caffe/Makefile.config
+    sed -i 's~-std=c++14~-std=c++17~g' caffe/Makefile.config.example
+
+    # Change Source.cpp to update the model file location
+    sed -i 's+models/cunet+/usr/share/waifu2x-caffe/models/cunet+g' waifu2x-caffe/Source.cpp
+
     cd ${srcdir}/build
-    cmake "${srcdir}/waifu2x-caffe" -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES  -gencode arch=compute_86,code=sm_86 "
+    cmake "${srcdir}/waifu2x-caffe" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--copy-dt-needed-entries" -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--copy-dt-needed-entries" -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES  -gencode arch=compute_86,code=sm_86 "
     # Fix issue with the compile failing. These flags need to be removed from the CUDA_FLAGS, but I can't find which CMakeFile is generating this line. So just remove it with sed.
     sed -i 's/-Xcudafe --diag_suppress=set_but_not_used -DBOOST_ALL_NO_LIB;-DUSE_LMDB;-DUSE_LEVELDB;-DUSE_CUDNN;-DUSE_OPENCV;-DWITH_PYTHON_LAYER//g' libcaffe/src/caffe/CMakeFiles/caffe.dir/flags.make
 }

Bumped everything to C++17 (forced by other dependencies), libopencv_highgui requires qt6-base libraries now and applied (temporary) workaround for linker failure around this protobuf issue until it's fixed upstream.
Note that missing headers for cblas is still an issue, when blas-openblas is installed.

nx-que commented on 2023-07-28 19:50 (UTC) (edited on 2023-07-28 19:57 (UTC) by nx-que)

Unable to build this with clean chroot for a while now, seems to spit a lot of generic C++ errors. This is a wild guess, but to me it seems one of build dependencies requires c++17 now, taking this opencv issue as point of reference.

In file included from /usr/include/google/protobuf/stubs/common.h:44,
                 from /usr/include/google/protobuf/io/coded_stream.h:130,
                 from .build_release/src/caffe/proto/caffe.pb.h:24,
                 from tools/compute_image_mean.cpp:11:
/usr/include/absl/strings/string_view.h:52:26: error: ‘string_view’ in namespace ‘std’ does not name a type
   52 | using string_view = std::string_view;
      |                          ^~~~~~~~~~~
/usr/include/absl/strings/string_view.h:52:21: note: ‘std::string_view’ is only available from C++17 onwards
   52 | using string_view = std::string_view;
      |          

Also seems to have issues with cblas headers if blas-openblas (which should provide cblas) is used instead openblas as make dependency - it's fine right now in chroot, but gives include errors when built on host using blas-openblas.

ginnokami commented on 2023-01-29 12:05 (UTC)

@lurkingaround This happens because that library (which is linked against when compiling waifu2x) got updated. When this happens you will need to rebuild waifu2x. I will try to update the package rel when I notice it happening, but if you notice before I do just make a comment like you did and just rebuild for the meantime.

lurkingaround commented on 2023-01-29 06:25 (UTC) (edited on 2023-01-29 06:26 (UTC) by lurkingaround)

Getting this error.

waifu2x-caffe: error while loading shared libraries: libboost_filesystem.so.1.80.0: cannot open shared object file: No such file or directory

ginnokami commented on 2022-07-28 13:55 (UTC)

@lurkingaround I am able to build this in a chroot. So I believe you have somehow configured your path so that CMake can't find CUDA.

ginnokami commented on 2022-07-28 13:54 (UTC)

pkgrel-4 has changes only to the PKGBUILD: @Berunkeo - Git statements now use https. If you use paru you may need to blow away your cache, when I was building during testing I was getting a "not a git clone of" until I did this.

Also updated the make statements to use the user specified MAKEFLAGS instead of nprocs.

lurkingaround commented on 2022-07-23 09:44 (UTC)

Getting this error when I try to install it.

CMake Error at /usr/share/cmake/Modules/CMakeDetermineCUDACompiler.cmake:180 (message):
  Failed to find nvcc.

  Compiler requires the CUDA toolkit.  Please set the CUDAToolkit_ROOT
  variable.
Call Stack (most recent call first):
  caffe/CMakeLists.txt:18 (project)


-- Configuring incomplete, errors occurred!
See also "/home/metabox/.cache/yay/waifu2x-caffe/src/build/CMakeFiles/CMakeOutput.log".
See also "/home/metabox/.cache/yay/waifu2x-caffe/src/build/CMakeFiles/CMakeError.log".
==> ERROR: A failure occurred in prepare().
    Aborting...

Beruneko commented on 2022-03-28 22:32 (UTC)

Because of Safety measures by Github, please set git to use https protocol and overwrite the insecure git:// protocol in the PKGBUILD by running git config --global url."https://".insteadOf git:// or change the PKGBUILD directly.

Waiting for a fix by the maintainer~ ouo