termux-user-repository / tur

A place for all types of Termux packages.
Other
362 stars 73 forks source link

new packages: rife-ncnn-vulkan{,-nihui,-tntwise} #1017

Closed knyipab closed 1 month ago

knyipab commented 1 month ago

managed to build rife-ncnn-vulkan and tested with:

rife-ncnn-vulkan -0 0.png -1 1.png -o test.png -m rife-v4.6 -g -1

It works BUT it cannot work using gpu (i.e. without -g -1), with error below:

SPIR-V WARNING:
    In file ../src/compiler/spirv/spirv_to_nir.c:4862
    Unsupported SPIR-V capability: SpvCapabilityStorageBuffer8BitAccess (4448)
    36 bytes into the SPIR-V binary
validation fail: (type_size(instr->cat6.type) <= 16) == !!((instr->srcs[2])->flags & IR3_REG_HALF)
  -> for instruction: MESA: info: 0000:000:     stib.base0 ssa_43, ssa_75, hssa_76

I have no ideas, but I speculate that even after solving this error, vulkan will likely generates black image (an issue I raised at https://github.com/nihui/rife-ncnn-vulkan/issues/41).

Anyways, even with this caveat, I still want it to be listed on TUR. Thanks.

knyipab commented 1 month ago

By the way, little more info, rife-vulkan-ncnn uses older version of glslang so it cannot be built to dynamically link to the libncnn package (i.e. -DUSE_SYSTEM_NCNN=ON does not compile).

knyipab commented 1 month ago

@licy183 Thanks. Fixed and tested with the command.

knyipab commented 1 month ago

Seems to build two packages in one go and does not remove the soft link before building the other: ln: failed to create symbolic link '/data/data/com.termux/files/usr/bin/rife-ncnn-vulkan': File exists

There is no problem if building separately. Grateful for advice. Thanks.

[Edited:] By the way, I am not so familiar. should it be TERMUX_PKG_GIT_BRANCH=v$TERMUX_PKG_VERSION instead?

knyipab commented 1 month ago

I investigated and found few things:

Thank you for your advice.

knyipab commented 1 month ago

@licy183 two things:

knyipab commented 1 month ago

Thanks a lot for help!

TNTwise updated the repo to 20240515 after I reflected the cpu mode segfault bug yesterday in https://github.com/TNTwise/rife-ncnn-vulkan/issues/4.

After that, we may test all commands below and they should work for both -nihui and -tntwise

git clone https://github.com/nihui/rife-ncnn-vulkan
cd ./rife-ncnn-vulkan/images
# GPU mode
rife-ncnn-vulkan -0 0.png -1 1.png -o test.png
rife-ncnn-vulkan -0 0.png -1 1.png -o test.png -m rife-v4.6
rife-ncnn-vulkan -0 0.png -1 1.png -o test.png -m rife-v4-latest
# CPU mode
rife-ncnn-vulkan -0 0.png -1 1.png -o test.png -g -1
rife-ncnn-vulkan -0 0.png -1 1.png -o test.png -m rife-v4.6 -g -1
rife-ncnn-vulkan -0 0.png -1 1.png -o test.png -m rife-v4-latest -g -1