Package Details: upscaler 1.4.0-2

Git Clone URL: https://aur.archlinux.org/upscaler.git (read-only, click to copy)
Package Base: upscaler
Description: Upscale and enhance images
Upstream URL: https://gitlab.gnome.org/World/Upscaler
Licenses: GPL-3.0-only
Submitter: igor-dyatlov
Maintainer: FabioLolix
Last Packager: FabioLolix
Votes: 5
Popularity: 1.11
First Submitted: 2022-11-16 17:58 (UTC)
Last Updated: 2024-10-27 14:00 (UTC)

Latest Comments

FabioLolix commented on 2024-10-27 14:10 (UTC)

I noticed that the upstream build instructions tell you to download the vulkan SDK, but apparently, there's no need to package the whole SDK. Instead, it's sufficient to have the glslangValidator binary available, which is packaged in extra/glslang.

Yes and vulkan-headers + shaderc, we typically have that already packaged

If you call upscayl-bin, it will assume the models live in the same directory, under a subdirectory called models/

I have adopted this approach, the github repo is updated too

My previous issue was due to the lacks of the models seems

rien333 commented on 2024-10-27 13:16 (UTC) (edited on 2024-10-27 13:17 (UTC) by rien333)

I have made that locally yesterday but run in another problem with upscaler (no longer works even older versions)

I also got upscayl-ncnn to build. I noticed that the upstream build instructions tell you to download the vulkan SDK, but apparently, there's no need to package the whole SDK. Instead, it's sufficient to have the glslangValidator binary available, which is packaged in extra/glslang.

I have made that locally yesterday but run in another problem with upscaler (no longer works even older versions)

I got Upscaler to work fine actually, though it needed some tweaks. The most pressing problem resides in the file upscaler/window.py:

            selected_model = list(self.model_images)[self.combo_models.get_selected()]
            queue_row.command = [
                "upscayl-bin",
                # fmt: off
                "-i",
                str(input_path),
                "-o",
                str(self.output_file_path),
                "-n",
                str(selected_model),
                "-s",
                str(self.spin_scale.get_value()),
                # fmt: on
            ]

If you call upscayl-bin, it will assume the models live in the same directory, under a subdirectory called models/. You can change this behavior by passing the -m flag, with the value /usr/share/realesrgan-ncnn-vulkan/models/. However, the code above just operates under the assumption that models live in a models/ subdir, relative to the location of the upscayl-bin binary.

And indeed, that is how the models are packaged if building the Flatpak:

{
            "name": "vulkan-models",
            "buildsystem": "simple",
            "build-commands": [
                "mkdir /app/bin/models; mv *.{bin,param} /app/bin/models"
            ],
            "sources": [
                {
                    "type": "archive",
                    "url": "https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesrgan-ncnn-vulkan-20220424-ubuntu.zip",
                    "sha256": "e5aa6eb131234b87c0c51f82b89390f5e3e642b7b70f2b9bbe95b6a285a40c96"
                }
            ]
        }

I'm not sure how we should fix this. One way would be to change upstream such that it has a more robust way to detect where the vulkan models live. This seems hard to do for all different OSes and distros. The other way is to patch the file window.py during the prepare() function of the PKGBUILD, such that upscayl-bin is called with the -m flag + the path to where the vulkan models live on Arch.

Unfortunately, both options have their problems. Maybe you have an opinion here?

FabioLolix commented on 2024-10-27 12:11 (UTC)

I think the right way forward is to package upscayl-ncnn for the AUR, and add it to the depends here. I'll have a go at that now.

I have made that locally yesterday but run in another problem with upscaler (no longer works even older versions)

rien333 commented on 2024-10-27 12:03 (UTC)

Thanks for updating the PKGBUILD! Unfortunately, recent versions of Upscaler come with a new dependency — one that, moreover, has yet to be packaged for the AUR. The dependency in question lives at https://github.com/upscayl/upscayl-ncnn. This is not to be confused with the upscayl electron app from the same project, which is already packaged.

I think the right way forward is to package upscayl-ncnn for the AUR, and add it to the depends here. I'll have a go at that now.

FabioLolix commented on 2024-10-26 11:24 (UTC)

If you want to contribute the pkgbuild is hosted here https://github.com/FabioLolix/PKGBUILD-AUR_fix, another update for this is coming after I've started and finished a related thing

rien333 commented on 2024-10-26 11:03 (UTC)

Still interested in maintaining this?

celebrimbor commented on 2023-11-09 06:14 (UTC) (edited on 2023-12-13 06:22 (UTC) by celebrimbor)

I believe it needs to include python-pillow package as well. Also, it crashes when using the file picker but works fine with using drag and drop.

bordam commented on 2022-11-21 22:22 (UTC)

Why is the dependency realesrgan-ncnn-vulkan-bin and not realesrgan-ncnn-vulkan, like in the git package?

FabioLolix commented on 2022-11-16 22:13 (UTC)

Hello, for VCS sources please don't rename the sources with $pkgname-$pkgver::, this will download the whole repo for every version and make the use of a common source folder (SRCDEST= in makepkg.conf) useless