Selur's Little Message Board
[BUG] Vapoursynth Custom Filter Settings - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: [BUG] Vapoursynth Custom Filter Settings (/thread-1249.html)



Vapoursynth Custom Filter Settings - Dan64 - 13.02.2020

I'm using the latest version "Hybrid_2020.01.12.1" (*) on Windows

The Filter "Vapoursynth->Custom" has the following issues:

1) When I select "Insert before->Resize", the function "beforeAddingGrain(clip)" is generated after the Resize, for example:

# resizing clip to 960x724
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=724, interlaced=False, interlacedd=False)
clip = beforeAddingGrain(clip)

2) When I try to save the Custom script is issued the following error:

FilteringModel get-> found no field
vsSelectRangeEveryLength:vsSelectRangeEveryOffset

   In any case the script is saved, but when I try to restore it, it issued again the same error and the script is not loaded.


(*) I have the same problem with the dev version: Hybrid_dev_2020.02.05-193047.exe


RE: Vapoursynth Custom Filter Settings - Selur - 13.02.2020

I can reproduce the problem with the custom placement and will fix it.

Without details about how you are trying to save, what custom script, I can't really help.

Cu Selur


RE: Vapoursynth Custom Filter Settings - Dan64 - 13.02.2020

In the following picture is shown the the custom script

[Image: Hybrid-Capture-1.png]

In this pictures is shown the save Dialog

[Image: Hybrid-Capture-2.png]

In this picture is shown the error

[Image: Hybrid-Capture-3.png]

P.S.
To be able to use the Tweak function inside the script, I have to add it also in the GUI, for some reason adding the code "import adjust" inside the script is not working.


RE: Vapoursynth Custom Filter Settings - Selur - 13.02.2020

Will look at it over the weekend since I can't motivate me atm. to write down all that code when you could have posted it inside 'code'-tags for easy copying,..


RE: Vapoursynth Custom Filter Settings - Dan64 - 13.02.2020

Here the script (the output is for a 10bit encoding)

# Loading Support Files
import ctypes
Dllref = ctypes.windll.LoadLibrary("D:/Programs/Hybrid/64bit/vsfilters/ResizeFilter/Waifu2x-caffe/cudnn64_7.dll")
# Loading Plugins
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/ResizeFilter/Waifu2x-caffe/Waifu2x-caffe.dll")
# Color Adjustment (add also Tweak in GUI)
# clip = adjust.Tweak(clip=clip, hue=0.0, sat=1.0, bright=0, cont=1.0, coring=False)
# adjusting color space from YUV420P8 to RGBS for Waifu2x-caffe
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# resizing using Waifu2x-caffe
clip = core.caffe.Waifu2x(clip=clip, scale=2, noise=2, model=3, cudnn=True, processor=0, tta=False, block_w = 360, block_h = 272, batch = 1)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="470bg", range_s="limited")
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=720, interlaced=False, interlacedd=False)

You have to the download the file: https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Waifu2x-caffe/releases/download/r13/Waifu2x-caffe-r13.7z

then you have to unzip it in [Home Hybrid]>/64bit/vsfilters/ResizeFilter and rename the folder "plugins64" in "Waifu2x-caffe".

[Home Hybrid]/64bit/vsfilters/ResizeFilter/



P.S.

Le me know if you need the CUDA file: "cudnn64_7.dll"


RE: Vapoursynth Custom Filter Settings - Dan64 - 14.02.2020

I'm unable to remove the problem by resetting the settings. I attached to this post, the zipped "json" file with the configuration showing the error.

In any case I discovered that the CrossButton used to save the configuration don't save the script.

So I think that currently is missing a way to save the custom script in Hybrid. Feature that should be added.

[attachment=807]


RE: Vapoursynth Custom Filter Settings - Selur - 14.02.2020

The problem is your profile which you did not reset.
You can fix it by replacing
"vsSelectRangeEveryLength:vsSelectRangeEveryOffset": "",
with:
"vsSelectRangeEveryLength": "50",
"vsSelectRangeEveryOffset": "0",
as a side note: Hybrid does not save custom scripts. (your profile does not include them)

I'll think about adding an option to do that, no promises.

Cu Selur


RE: Vapoursynth Custom Filter Settings - Dan64 - 15.02.2020

Problem fixed. The option to save the custom scripts could be useful.

Thank you!