not an issue but suggestion
zelenooki87 opened this issue · 3 comments
zelenooki87 commented
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!
HolyWu commented
If it's supported by chaiNNer then you can convert the model to onnx and run inference with vs-mlrt.
Selur commented
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.