HolyWu / vs-grlir

GRLIR function for VapourSynth
MIT License
15 stars 0 forks source link

not an issue but suggestion #6

Open zelenooki87 opened 1 year ago

zelenooki87 commented 1 year ago

Could you please implement vapoursynth to this project. https://github.com/sunny2109/SAFMN cause it is fenomenal for low res input Thank you very much in advance!

Selur commented 6 months ago

espeically SAFMN++, seems interessting.

HolyWu commented 6 months ago

If it's supported by chaiNNer then you can convert the model to onnx and run inference with vs-mlrt.

Selur commented 6 months ago

sadly model team23_safmnpp.pth is unsupported by chaiNNer.

But there is https://github.com/sunny2109/SAFMN/tree/main/scripts/to_onnx and SAFMN_onnx_pt.zip contains an onnx-file which supports 940x640 resolution, and:

w = clip.width
h = clip.height
clip = core.resize.Bicubic(clip=clip, width=960, height=640, format=vs.RGBS, matrix_in_s="470bg", range_s="full")
from vsmlrt import Backend
clip = vsmlrt.inference([clip],network_path="C:/Users/Selur/Desktop/SAFMN_640_960_x2.onnx", backend=Backend.OV_CPU(num_streams=1))
clip = core.resize.Bicubic(clip=clip, width=w*2, height=h*2)

does seem to work.