MrPenguin07 / ebuilds

MrPenguin's custom Gentoo ebuilds & overlay
MIT License
3 stars 1 forks source link

media-gfx/upscayl-bin: "fopen /usr/bin/models/realesrgan-x4plus.param failed fopen /usr/bin/models/realesrgan-x4plus.bin failed" #3

Closed vitaly-zdanevich closed 4 months ago

vitaly-zdanevich commented 4 months ago
$ upscayl-cli -i eye-tv.jpg -o /tmp/o.jpg
🚀 Starting Upscayl - Copyright © 2024
✨ Detected scale x4
✨ Using the default scale x4
[0 AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO)]  queueC=1[4]  queueG=0[1]  queueT=0[1]
[0 AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO)]  bugsbn1=0  bugbilz=34  bugcopc=0  bugihfa=0
[0 AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO)]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1
  fopen /usr/bin/models/realesrgan-x4plus.param failed
fopen /usr/bin/models/realesrgan-x4plus.bin failed
find_blob_index_by_name data failed
Try
find_blob_index_by_name output failed
Try
0.00%
find_blob_index_by_name data failed
Try
find_blob_index_by_name output failed
Try
25.00%
find_blob_index_by_name data failed
Try
find_blob_index_by_name output failed
Try
50.00%
find_blob_index_by_name data failed
Try
find_blob_index_by_name output failed
Try
75.00%
100.00%

🙌 Upscayled Successfully!

And I got black image in output.

iGPU in AMD 7950x.

MrPenguin07 commented 4 months ago

I know what's happening here but never encountered it as I don't use the cli.

You can add -m /opt/Upscayl/resources/models/ to your cmd line. This is occurring due to /opt being 'non standard' to the ncnn hardcoded model path. When using upscayl gui, it overwrites the default path to what is set in the options.

I will consider either adding a symlink to the ebuild or discussing alternatives with upscayl dev. Thanks

MrPenguin07 commented 4 months ago

Fixed. Thanks!

vitaly-zdanevich commented 4 months ago

I know what's happening here but never encountered it as I don't use the cli.

For media-gfx/upscayl-9999 there is no gui? But in dependency we have x11-libs/gtk+...

vitaly-zdanevich commented 4 months ago

For media-gfx/upscayl-bin is also only cli is available to call...

MrPenguin07 commented 4 months ago

I know what's happening here but never encountered it as I don't use the cli.

For media-gfx/upscayl-9999 there is no gui? But in dependency we have x11-libs/gtk+...

Did you try running the .desktop? Did you run equery files upscayl to see what/where it installs to? I can create another symlink to /opt/bin but really seems pointless to run gui apps from $PATH.

Side note, I do not wish these ebuilds to be added to Guru. As a contributor, package maintainer for Upscayl I am responsible for keeping the ebuilds up to date so they will live here where I can easily maintain.

vitaly-zdanevich commented 4 months ago
$ equery files upscayl-bin
 * Searching for upscayl-bin ...
 * Contents of media-gfx/upscayl-bin-2.11.5:
/opt
/opt/Upscayl
/opt/Upscayl/LICENSE.electron.txt
/opt/Upscayl/LICENSES.chromium.html
/opt/Upscayl/chrome-sandbox
/opt/Upscayl/chrome_100_percent.pak
/opt/Upscayl/chrome_200_percent.pak
/opt/Upscayl/chrome_crashpad_handler
/opt/Upscayl/icudtl.dat
/opt/Upscayl/libEGL.so
/opt/Upscayl/libGLESv2.so
/opt/Upscayl/libffmpeg.so
/opt/Upscayl/libvk_swiftshader.so
/opt/Upscayl/libvulkan.so.1
/opt/Upscayl/locales
/opt/Upscayl/locales/af.pak
/opt/Upscayl/locales/am.pak
/opt/Upscayl/locales/ar.pak
/opt/Upscayl/locales/bg.pak
/opt/Upscayl/locales/bn.pak
/opt/Upscayl/locales/ca.pak
/opt/Upscayl/locales/cs.pak
/opt/Upscayl/locales/da.pak
/opt/Upscayl/locales/de.pak
/opt/Upscayl/locales/el.pak
/opt/Upscayl/locales/en-GB.pak
/opt/Upscayl/locales/en-US.pak
/opt/Upscayl/locales/es-419.pak
/opt/Upscayl/locales/es.pak
/opt/Upscayl/locales/et.pak
/opt/Upscayl/locales/fa.pak
/opt/Upscayl/locales/fi.pak
/opt/Upscayl/locales/fil.pak
/opt/Upscayl/locales/fr.pak
/opt/Upscayl/locales/gu.pak
/opt/Upscayl/locales/he.pak
/opt/Upscayl/locales/hi.pak
/opt/Upscayl/locales/hr.pak
/opt/Upscayl/locales/hu.pak
/opt/Upscayl/locales/id.pak
/opt/Upscayl/locales/it.pak
/opt/Upscayl/locales/ja.pak
/opt/Upscayl/locales/kn.pak
/opt/Upscayl/locales/ko.pak
/opt/Upscayl/locales/lt.pak
/opt/Upscayl/locales/lv.pak
/opt/Upscayl/locales/ml.pak
/opt/Upscayl/locales/mr.pak
/opt/Upscayl/locales/ms.pak
/opt/Upscayl/locales/nb.pak
/opt/Upscayl/locales/nl.pak
/opt/Upscayl/locales/pl.pak
/opt/Upscayl/locales/pt-BR.pak
/opt/Upscayl/locales/pt-PT.pak
/opt/Upscayl/locales/ro.pak
/opt/Upscayl/locales/ru.pak
/opt/Upscayl/locales/sk.pak
/opt/Upscayl/locales/sl.pak
/opt/Upscayl/locales/sr.pak
/opt/Upscayl/locales/sv.pak
/opt/Upscayl/locales/sw.pak
/opt/Upscayl/locales/ta.pak
/opt/Upscayl/locales/te.pak
/opt/Upscayl/locales/th.pak
/opt/Upscayl/locales/tr.pak
/opt/Upscayl/locales/uk.pak
/opt/Upscayl/locales/ur.pak
/opt/Upscayl/locales/vi.pak
/opt/Upscayl/locales/zh-CN.pak
/opt/Upscayl/locales/zh-TW.pak
/opt/Upscayl/resources
/opt/Upscayl/resources.pak
/opt/Upscayl/resources/128x128.png
/opt/Upscayl/resources/512x512.png
/opt/Upscayl/resources/app-update.yml
/opt/Upscayl/resources/app.asar
/opt/Upscayl/resources/app.asar.unpacked
/opt/Upscayl/resources/app.asar.unpacked/node_modules
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/LICENSE
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/install
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/install/check.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/channel.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/colour.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/composite.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/constructor.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/index.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/input.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/is.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/libvips.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/operation.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/output.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/resize.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/sharp.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/lib/utility.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/LICENSE
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/bin
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/bin/semver.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/classes
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/classes/comparator.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/classes/index.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/classes/range.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/classes/semver.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/clean.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/cmp.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/coerce.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/compare-build.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/compare-loose.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/compare.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/diff.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/eq.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/gt.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/gte.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/inc.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/lt.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/lte.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/major.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/minor.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/neq.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/parse.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/patch.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/prerelease.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/rcompare.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/rsort.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/satisfies.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/sort.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/functions/valid.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/index.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/internal
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/internal/constants.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/internal/debug.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/internal/identifiers.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/internal/lrucache.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/internal/parse-options.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/internal/re.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/package.json
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/preload.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/range.bnf
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/gtr.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/intersects.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/ltr.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/max-satisfying.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/min-satisfying.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/min-version.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/outside.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/simplify.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/subset.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/to-comparators.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/node_modules/semver/ranges/valid.js
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/package.json
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/src
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/src/common.h
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/src/metadata.h
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/src/operations.h
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/src/pipeline.h
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/src/stats.h
/opt/Upscayl/resources/app.asar.unpacked/node_modules/sharp/src/utilities.h
/opt/Upscayl/resources/bin
/opt/Upscayl/resources/bin/upscayl-bin
/opt/Upscayl/resources/models
/opt/Upscayl/resources/models/realesrgan-x4fast.bin
/opt/Upscayl/resources/models/realesrgan-x4fast.param
/opt/Upscayl/resources/models/realesrgan-x4plus-anime.bin
/opt/Upscayl/resources/models/realesrgan-x4plus-anime.param
/opt/Upscayl/resources/models/realesrgan-x4plus.bin
/opt/Upscayl/resources/models/realesrgan-x4plus.param
/opt/Upscayl/resources/models/remacri.bin
/opt/Upscayl/resources/models/remacri.param
/opt/Upscayl/resources/models/ultramix_balanced.bin
/opt/Upscayl/resources/models/ultramix_balanced.param
/opt/Upscayl/resources/models/ultrasharp.bin
/opt/Upscayl/resources/models/ultrasharp.param
/opt/Upscayl/resources/org.upscayl.Upscayl.desktop
/opt/Upscayl/resources/package-type
/opt/Upscayl/snapshot_blob.bin
/opt/Upscayl/upscayl
/opt/Upscayl/v8_context_snapshot.bin
/opt/Upscayl/vk_swiftshader_icd.json
/usr
/usr/bin
/usr/bin/upscayl-cli
/usr/share
/usr/share/applications
/usr/share/applications/upscayl.desktop
/usr/share/doc
/usr/share/doc/upscayl-bin-2.11.5
/usr/share/doc/upscayl-bin-2.11.5/changelog.bz2
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/128x128
/usr/share/icons/hicolor/128x128/apps
/usr/share/icons/hicolor/128x128/apps/upscayl.png
/usr/share/icons/hicolor/512x512
/usr/share/icons/hicolor/512x512/apps
/usr/share/icons/hicolor/512x512/apps/upscayl.png

But I use i3wm, without a desktop, I have dmenu - only upscayl-cli is available :(

vitaly-zdanevich commented 4 months ago

I can create another symlink to /opt/bin but really seems pointless to run gui apps from $PATH.

Why?

$  which firefox
/usr/bin/firefox
$ which audacity 
/usr/bin/audacity
MrPenguin07 commented 4 months ago

/usr/share /usr/share/applications /usr/share/applications/upscayl.desktop

But I use i3wm, without a desktop, I have dmenu - only upscayl-cli is available :(

I use Sway and upscayl is absolutely available by way of upscayl.desktop in rofi (same as dmenu). image

MrPenguin07 commented 4 months ago

I can create another symlink to /opt/bin but really seems pointless to run gui apps from $PATH.

Why?

$  which firefox
/usr/bin/firefox
$ which audacity 
/usr/bin/audacity

$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/18/bin:/usr/lib/llvm/17/bin:/etc/eselect/wine/bin:/home/user/.local/bin/:/home/user/.cargo/bin:/usr/lib64/qt5/bin/

Why? because /opt/bin is where it should go for anything installed under /opt. /opt/bin should be in your $PATH by default.

$ which upscayl /opt/bin/upscayl

vitaly-zdanevich commented 4 months ago

Thanks, solved - now I can run desktop files:

I had:

bindsym $mod+d exec dmenu_run -fn 'Droid Sans Mono-35' -b -l 20

Now:

bindsym $mod+d exec i3-dmenu-desktop --dmenu 'dmenu -fn "Droid Sans Mono-35" -b -l 20'