I uploaded a new dev, which should fix this, but may break vs-mlrt support one way or anohter. (rewrote quite a bit of code and haven't tested it a lot)
Cu Selur
+ Reply to Thread
Results 2,491 to 2,516 of 2516
-
users currently on my ignore list: deadrats, Stears555, marcorocchini
-
Yes, the Upscaling + Retinex-Line-Thinning works now. So "vapoursynth-->frame-->resize-->resizer-->vsmlrt" works. But "vapoursynth-->other-->vsmlrt" does now not work anymore. It throws that error:
And this is the vapoursynth preview:Code:2026-06-27 16:50:03.198 Plugin C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll is using API3 which is deprecated and will be removed shortly. Plugin C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll is using API3 which is deprecated and will be removed shortly. 2026-06-27 16:50:03.872 Failed to evaluate the script: Python exception: input format must be equal to output format Traceback (most recent call last): File "vapoursynth.pyx", line 3623, in vapoursynth._vpy_evaluate File "vapoursynth.pyx", line 3624, in vapoursynth._vpy_evaluate File "C:\Users\Gaming-Tower\Documents\Hybrid\Tempfolder\tempPreviewVapoursynthFile16_50_02_305.vpy", line 53, in clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,num_streams=2,verbose=True,use_cuda_graph=False,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=1)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3138, in inference return inference_with_fallback( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3111, in inference_with_fallback raise e File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3088, in inference_with_fallback ret = _inference( ^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 2905, in _inference engine_path = trtexec( ^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 2087, in trtexec convert_model( File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 1958, in convert_model raise ValueError("input format must be equal to output format") ValueError: input format must be equal to output format
While this is the vapoursynth preview with from the Frame-->Resize Tab (the working one):Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRTFilter clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBS for vsVSMLRTFilter clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="709", range_in_s="full", range_s="full") # filtering using VSMLRT from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,num_streams=2,verbose=True,use_cuda_graph=False,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=1)) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) # adjusting output color from RGBS to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1
And here ist the Error and Preview from the Others-Tab, but with 32Bit Checkbox checked:Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRT clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRT clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # resizing using VSMLRT, target: 3840x2160 from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,num_streams=2,verbose=True,use_cuda_graph=False,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=1)) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) # adjusting output color from RGBH to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1
Prieview:Code:2026-06-27 16:58:41.718 Plugin C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll is using API3 which is deprecated and will be removed shortly. Plugin C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll is using API3 which is deprecated and will be removed shortly. 2026-06-27 16:58:42.652 Failed to evaluate the script: Python exception: operator (): bits per sample mismatch Traceback (most recent call last): File "vapoursynth.pyx", line 3623, in vapoursynth._vpy_evaluate File "vapoursynth.pyx", line 3624, in vapoursynth._vpy_evaluate File "C:\Users\Gaming-Tower\Documents\Hybrid\Tempfolder\tempPreviewVapoursynthFile16_58_40_900.vpy", line 53, in clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=False,device_id=0,bf16=False,num_streams=2,verbose=True,use_cuda_graph=False,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=0)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3138, in inference return inference_with_fallback( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3111, in inference_with_fallback raise e File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3088, in inference_with_fallback ret = _inference( ^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 2940, in _inference ret = core.trt.Model( ^^^^^^^^^^^^^^^ File "vapoursynth.pyx", line 3353, in vapoursynth.Function.__call__ vapoursynth.Error: operator (): bits per sample mismatch
LLM says, the problem is, that the "Vapoursynth-->Other" -Tab version of vsmlrt uses RGBS for 16Bit and RGBH for 32Bit (when checkend) and it should be the other way around (like on the "Vapoursynth-->Frame-Resize-->Resizer" -Tab, which does it correct).Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRTFilter clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRTFilter clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # filtering using VSMLRT from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=False,device_id=0,bf16=False,num_streams=2,verbose=True,use_cuda_graph=False,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=0)) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) # adjusting output color from RGBH to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1
Maybe this helps. -
Like I suspected, I overlooked something somewhere.

Uploaded a new dev.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Ok, i have testet it. It works half

Both vsmlrt version works now with 32 bit checkbox but both does not work with 16bit checkbox. They work with line thinning (when using 32 bit).
Here are the 4 vapour synth preview:
Frame-Resize Tab 16 Bit:
Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRT clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRT clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # resizing using VSMLRT, target: 3840x2160 from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files")) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) # adjusting output color from RGBH to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1
Frame-resize-Tab-16bit error:
Code:2026-06-27 18:46:10.552 Plugin C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll is using API3 which is deprecated and will be removed shortly. Plugin C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll is using API3 which is deprecated and will be removed shortly. 2026-06-27 18:46:11.174 Failed to evaluate the script: Python exception: input format must be equal to output format Traceback (most recent call last): File "vapoursynth.pyx", line 3623, in vapoursynth._vpy_evaluate File "vapoursynth.pyx", line 3624, in vapoursynth._vpy_evaluate File "C:\Users\Gaming-Tower\Documents\Hybrid\Tempfolder\tempPreviewVapoursynthFile18_46_09_803.vpy", line 53, in clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3138, in inference return inference_with_fallback( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3111, in inference_with_fallback raise e File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3088, in inference_with_fallback ret = _inference( ^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 2905, in _inference engine_path = trtexec( ^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 2087, in trtexec convert_model( File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 1958, in convert_model raise ValueError("input format must be equal to output format") ValueError: input format must be equal to output format
Frame-resize tab 32bit:
Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRT clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBS for vsVSMLRT clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="709", range_in_s="full", range_s="full") # resizing using VSMLRT, target: 3840x2160 from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=False,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files")) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) # adjusting output color from RGBS to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1
Others-Tab 32 bit:
Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRTFilter clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBS for vsVSMLRTFilter clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="709", range_in_s="full", range_s="full") # filtering using VSMLRT from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=False,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files")) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) # adjusting output color from RGBS to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1Others-tab 16 bit:Others-tab 16bit error:Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRTFilter clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRTFilter clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # filtering using VSMLRT from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files")) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) # adjusting output color from RGBH to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1
Code:2026-06-27 18:48:30.000 Plugin C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll is using API3 which is deprecated and will be removed shortly. Plugin C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll is using API3 which is deprecated and will be removed shortly. 2026-06-27 18:48:30.640 Failed to evaluate the script: Python exception: input format must be equal to output format Traceback (most recent call last): File "vapoursynth.pyx", line 3623, in vapoursynth._vpy_evaluate File "vapoursynth.pyx", line 3624, in vapoursynth._vpy_evaluate File "C:\Users\Gaming-Tower\Documents\Hybrid\Tempfolder\tempPreviewVapoursynthFile18_48_29_205.vpy", line 53, in clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3138, in inference return inference_with_fallback( ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3111, in inference_with_fallback raise e File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 3088, in inference_with_fallback ret = _inference( ^^^^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 2905, in _inference engine_path = trtexec( ^^^^^^^^ File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 2087, in trtexec convert_model( File "C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py", line 1958, in convert_model raise ValueError("input format must be equal to output format") ValueError: input format must be equal to output format
LLM says, that the problem is the deleted output_format parameter. It should be dynamicly set depending on which setting i use. But i don't know if it knows' what it is talking about.
But at the end i guess when i do NOT check the 32bit-Checkbox, it must be outputformat=1 and RGBH??? And when the 32bit checkbox ist checked, it must be outputformat=0 and RGBS ??? So depending on what the checkbox says, it has to take these 2 things.
I don't know honestly. But LLM says sth like that
-
Ahh,... during refactoring (to always use basically same code for all vs-mlrt filters), I wrote a nice function
but, I forgot to actually call in it.Code:void VsMLRTFilterBase::appendOutputFormat(const QString& norm, QStringList& params) const { if (norm.contains("NPU") | norm.contains("MIGX") || norm == "TRT_RTX" || norm == "OV_CPU" || norm == "OV_GPU") return; params << "output_format=" + QString::number(m_fp16 ? 1 : 0); }
*gig*
=> uploaded a new dev
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Question: Is it possible in hybrid (somehow) to use my GPU for the Thin (GLSL-A4k) under Filtering-->Vapoursynth-->Line-->Misc ? Because it slows down my process by like 5 times (doesnt matter if i use fast or HQ). And i use only 0.15 strength and 1 iteration. My 13900k ist burning and my GPU is doing nearly nothing.
Maybe with a custom skript or so? Is this possible (with a retinex-mask) ?
Edit: I used GLSL under Vapoursynth--Others, but it is exactly the same speed as on vapoursynt-->line-->misc. And i actually noticed, that the retinex-mask is the reason why it does eat so much perfomance. Is there anything more perfomant than retinex with same quality ?Last edited by Platos; 28th Jun 2026 at 03:54.
-
GLSL filters are already run through the GPU.
GLSL (OpenGL Shading Language) a C-like programming language, which is run on the shader of the gpu.
That is as expected, since both would use the same filters and code.I used GLSL under Vapoursynth--Others, but it is exactly the same speed as on vapoursynt-->line-->misc.
Yes, Retinex is rather slow.And i actually noticed, that the retinex-mask is the reason why it does eat so much perfomance.
No there is no direct replacement for Retinex that is faster, otherwise I would have replaced Retinex with it.Is there anything more perfomant than retinex with same quality ?
But other edgemasks, with adjusted settings, might result in similar mask as retinex-mask would provide.
looking at the retinex_edgemask code:
there is something wrong,... the "if hasattr(core,'tcanny'):" shouldn't be there. (doesn't change anything since Hybrid does load tcanny)Code:# Use retinex to greatly improve the accuracy of the edge detection in dark scenes. # draft=True is a lot faster, albeit less accurate # from https://blog.kageru.moe/legacy/edgemasks.html def retinex_edgemask(src: vs.VideoNode, sigma: int=1, draft: bool=False) -> vs.VideoNode: src = Depth(src, 16) luma = GetPlane(src, 0) EXPR = core.llvmexpr.Expr if hasattr(core, 'llvmexpr') else core.akarin.Expr if hasattr(core, 'akarin') else core.cranexpr.Expr if hasattr(core, 'cranexpr') else core.std.Expr if draft: ret = EXPR(luma, 'x 65535 / sqrt 65535 *') else: ret = core.retinex.MSRCP(luma, sigma=[50, 200, 350], upper_thr=0.005) if hasattr(core,'tcanny'): mask = EXPR([kirsch(luma), ret.tcanny.TCanny(mode=1, sigma=sigma).std.Minimum(coordinates=[1, 0, 1, 0, 0, 1, 0, 1])], 'x y +') return maskLast edited by Selur; 28th Jun 2026 at 04:18.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Ah, ok, then
Ok, but retinex works as expected, when i use "show" in vapoursynth preview.
Anyway: I did now test all other masked available in hybrid and the only one which is as good as Retinex is KirschEdgeMask. When i use "show" i can see, that retinex is still more quality, but without it, it is 99% the same quality in output, but 2 times as fast (for me, while using cpu encoding).
BUT: It crashes, when using after upscaling. Similair like yesterday with the retinex-mask, but now with this mask. When i first upscale in a lossless encode and then using the KirschEdgeMasked-Linethinning, it works. Wait: Strange: When i use Vapoursynth-->Frame-Resize->resizer->vsmlrt it does crash again with RetinexMask or Kirsch Maske Linte thinning after upscaling. But only, when i use another resolution in "crop/resize". When i dont change it, it works. Hää? I thought yesterday it worked. Maybe i testet not with higher res on this part. At the same time i have open a window with filter queue which shows "sharpening, upscaling, sharpening, line thinning" and it works, i can open the preview. Why? There i use 3840x2160 in "crop/resize" and it does not crash. Does this work differntly, when using filter queue ? (Edit: i found sth out below in the post)
Here is the error with Upscaling + 2160p on crop/resize + RetinexEdgeMasked Line Thinning (after upscaling):
And here is the preview:Code:2026-06-28 11:48:26.949 Plugin C:/Program Files/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll is using API3 which is deprecated and will be removed shortly. Plugin C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll is using API3 which is deprecated and will be removed shortly. Plugin C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll is using API3 which is deprecated and will be removed shortly. 2026-06-28 11:48:27.967 Failed to evaluate the script: Python exception: retinex.MSRCP: Invalid input clip, only 8-16 bit int formats supported Traceback (most recent call last): File "vapoursynth.pyx", line 3623, in vapoursynth._vpy_evaluate File "vapoursynth.pyx", line 3624, in vapoursynth._vpy_evaluate File "C:\Users\Gaming-Tower\Documents\Hybrid\Tempfolder\tempPreviewVapoursynthFile11_48_26_187.vpy", line 64, in clipMask = masked.retinex_edgemask(src=clipMask, sigma=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Hybrid\64bit\vsscripts\masked.py", line 22, in retinex_edgemask ret = core.retinex.MSRCP(luma, sigma=[50, 200, 350], upper_thr=0.005) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "vapoursynth.pyx", line 3353, in vapoursynth.Function.__call__ vapoursynth.Error: retinex.MSRCP: Invalid input clip, only 8-16 bit int formats supported 2026-06-28 11:48:27.969 Core freed but 13 filter instance(s) still exist Core freed but 6227200 bytes still allocated in framebuffers
Here is the preview with 1920x1080 (inputresolution), rest is same (no error):Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/libvs_placebo.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/TCanny.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import masked from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRT clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRT clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # resizing using VSMLRT, target: 3840x2160 from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=1)) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) ## Starting applying 'EdgeMask (Retinex)' masked filtering for vsGLSLThinLine # Creating mask for clip clipMask = clip clipMask = masked.retinex_edgemask(src=clipMask, sigma=1) clipMask = core.resize.Bicubic(clip=clipMask, format=vs.GRAY16, range_in_s="full", range_s="full") clipFiltered = clip # adjusting color space from RGBH to YUV444P16 for vsGLSLThinLine clipFiltered = core.resize.Bicubic(clip=clipFiltered, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full") # Line thinning using GLSL Anime4K-Thin with open("C:/Program Files/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Thin_HQ.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define STRENGTH 0.6', '#define STRENGTH 0.2') glsl = glsl.replace('#define ITERATIONS 1', '#define ITERATIONS 1') clipFiltered = core.placebo.Shader(clipFiltered, shader_s=glsl, width=clipFiltered.width, height=clipFiltered.height) # adjusting clip color before mask merge clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full") # Resolution: clip: 3840x2160 and clipFiltered: 3840x2160 and clipMask: 3840x2160 # Merging: clip and clipFiltered based on clipMask clip = core.std.MaskedMerge(clip, clipFiltered, clipMask) # RetinexEdgeMask ## Finished applying 'RetinexEdgeMask' masked filtering for vsGLSLThinLine # adjusting output color from YUV444P16 to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1
Wait: I found sth out: I use a new fresh window: I use vapoursynth-->frame->resize vsmlrt + Linethinning after it with 3840x2160 (does not work). Then i add DetailSharpen and move it between resize and line thinning in filter order and it works now. Hä ?? Then i take away the sharpening and it works not anymore. Hä ?Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/libvs_placebo.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/TCanny.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import masked from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRT clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRT clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # resizing using VSMLRT, target: 1920x1080 from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=1)) # resizing 3840x2160 to 1920x1080 clip = core.resize.Bicubic(clip=clip, format=vs.RGBS) clip = core.fmtc.resample(clip, w=1920, h=1080, kernel="spline64", interlaced=False, interlacedd=False) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) ## Starting applying 'EdgeMask (Retinex)' masked filtering for vsGLSLThinLine # Creating mask for clip clipMask = clip clipMask = masked.retinex_edgemask(src=clipMask, sigma=1) clipMask = core.resize.Bicubic(clip=clipMask, format=vs.GRAY16, range_in_s="full", range_s="full", dither_type="error_diffusion") clipFiltered = clip # adjusting color space from RGBS to YUV444P16 for vsGLSLThinLine clipFiltered = core.resize.Bicubic(clip=clipFiltered, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # Line thinning using GLSL Anime4K-Thin with open("C:/Program Files/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Thin_HQ.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define STRENGTH 0.6', '#define STRENGTH 0.2') glsl = glsl.replace('#define ITERATIONS 1', '#define ITERATIONS 1') clipFiltered = core.placebo.Shader(clipFiltered, shader_s=glsl, width=clipFiltered.width, height=clipFiltered.height) # adjusting clip color before mask merge clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # Resolution: clip: 1920x1080 and clipFiltered: 1920x1080 and clipMask: 1920x1080 # Merging: clip and clipFiltered based on clipMask clip = core.std.MaskedMerge(clip, clipFiltered, clipMask) # RetinexEdgeMask ## Finished applying 'RetinexEdgeMask' masked filtering for vsGLSLThinLine # adjusting output color from YUV444P16 to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1
Here is the preview from frame-resize-vsmlrt + crop/resize 3840x2106 + Detailsharpen after resize + Line thinning with retinex mask after both (working):
Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/libvs_placebo.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/TCanny.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/zsmooth/zsmooth.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import masked import sharpen from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRT clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRT clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # resizing using VSMLRT, target: 3840x2160 from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=1)) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) # adjusting color space from RGBH to RGB48 for vsDetailSharpen clip = core.resize.Bicubic(clip=clip, format=vs.RGB48) # sharpening using DetailSharpen clip = sharpen.DetailSharpen(clip, sstr=0.250) ## Starting applying 'EdgeMask (Retinex)' masked filtering for vsGLSLThinLine # Creating mask for clip clipMask = clip clipMask = masked.retinex_edgemask(src=clipMask, sigma=1) clipMask = core.resize.Bicubic(clip=clipMask, format=vs.GRAY16, range_in_s="full", range_s="full") clipFiltered = clip # adjusting color space from RGB48 to YUV444P16 for vsGLSLThinLine clipFiltered = core.resize.Bicubic(clip=clipFiltered, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full") # Line thinning using GLSL Anime4K-Thin with open("C:/Program Files/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Thin_HQ.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define STRENGTH 0.6', '#define STRENGTH 0.2') glsl = glsl.replace('#define ITERATIONS 1', '#define ITERATIONS 1') clipFiltered = core.placebo.Shader(clipFiltered, shader_s=glsl, width=clipFiltered.width, height=clipFiltered.height) # adjusting clip color before mask merge clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full") # Resolution: clip: 3840x2160 and clipFiltered: 3840x2160 and clipMask: 3840x2160 # Merging: clip and clipFiltered based on clipMask clip = core.std.MaskedMerge(clip, clipFiltered, clipMask) # RetinexEdgeMask ## Finished applying 'RetinexEdgeMask' masked filtering for vsGLSLThinLine # adjusting output color from YUV444P16 to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.27.1
LLM says following:
"
Es ist nicht der DetailSharpen, der den Fehler behebt — es ist die Zeile direkt davor:
Python
# Das ist der eigentliche Fix:
clip = core.resize.Bicubic(clip=clip, format=vs.RGB48)
Diese Zeile wandelt das Format von RGBH (16-bit Floating Point) zu RGB48 (16-bit Integer pro Kanal = 48-bit insgesamt).
RGBH = Half-Float → retinex.MSRCP kann das nicht verarbeiten
RGB48 = 16-bit Integer → retinex.MSRCP kann das verarbeiten
"
Ok, this is to much for me. I thought yesterday RGBH is good for it. And now it is not anymore ? The LLM says also "RGB48 war nur ein Beispiel — jedes 8-16 bit Integer-Format funktioniert".
So i think the format-problem of the masking-prozess is still not working. i guess, i tested yesterday with sharpening in the prozess and thougth, it would work. It is the same with KirschEdgeMask. Not only Retinex. -
Edit: I let the LLM read the whole thread here (by making .pds out of it) ant it says following:
LLM:
Maybe it helps you somehow.Was ist WIRKLICH das Problem?
Es ist kein Auflösungsproblem und kein Bug im Retinex-Plugin selbst. Es ist ein Format-Tracking-Problem in Hybrids Script-Generierung.
Die Kette:
VSMLRT braucht als Input ein Float-Format → Hybrid konvertiert zu RGBH (16-bit Half-Float)
VSMLRT gibt auch RGBH aus (bei output_format=1 / FP16)
Retinex EdgeMask (masked.retinex_edgemask) ruft intern core.retinex.MSRCP auf
retinex.MSRCP akzeptiert nur 8-16 bit Integer-Formate (z.B. GRAY8, GRAY16, YUV420P8, RGB48)
Hybrid weist einfach clipMask = clip zu ohne zu prüfen, ob clip gerade ein Float-Format ist
→ Crash, weil RGBH (Float) an ein Integer-only Plugin übergeben wird.
Lösung: Vor masked.retinex_edgemask muss Hybrid explizit auf ein Integer-Format konvertieren, wenn der aktuelle Clip Float ist (RGBH/RGBS) -
try latest dev, I think I already fixed this.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
I tried it, it does sadly not work. It throws the exact same error.
Im not sure, if the preview contains sth different, but here is it (Upscaling + Crop/Resize to 2x and retinex line thinning after it):
And same behavior: When i use Upscaling - Sharpen - Line thinning, it works. When i use Upscaling - Line Thinning, it crashes. I guess, hybrid must automaticly check, if the format is the right, when using sth like a retinex mask.Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/libvs_placebo.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/TCanny.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import masked from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRT clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRT clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # resizing using VSMLRT, target: 3840x2160 from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=1)) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) ## Starting applying 'EdgeMask (Retinex)' masked filtering for vsGLSLThinLine # Creating mask for clip clipMask = clip clipMask = masked.retinex_edgemask(src=clipMask, sigma=1) clipMask = core.resize.Bicubic(clip=clipMask, format=vs.GRAY16, range_in_s="full", range_s="full") clipFiltered = clip # adjusting color space from RGBH to YUV444P16 for vsGLSLThinLine clipFiltered = core.resize.Bicubic(clip=clipFiltered, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full") # Line thinning using GLSL Anime4K-Thin with open("C:/Program Files/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Thin_HQ.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define STRENGTH 0.6', '#define STRENGTH 0.2') glsl = glsl.replace('#define ITERATIONS 1', '#define ITERATIONS 1') clipFiltered = core.placebo.Shader(clipFiltered, shader_s=glsl, width=clipFiltered.width, height=clipFiltered.height) # adjusting clip color before mask merge clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full") # Resolution: clip: 3840x2160 and clipFiltered: 3840x2160 and clipMask: 3840x2160 # Merging: clip and clipFiltered based on clipMask clip = core.std.MaskedMerge(clip, clipFiltered, clipMask) # RetinexEdgeMask ## Finished applying 'RetinexEdgeMask' masked filtering for vsGLSLThinLine # adjusting output color from YUV444P16 to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.28.1
Last edited by Platos; 28th Jun 2026 at 06:04.
-
try new dev
users currently on my ignore list: deadrats, Stears555, marcorocchini -
updated dev again, since I stumbled over another bug related to color changes and masking.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Shit, as it seems, i tested not good enough. It is still not working with Resize + Masked Line Thinning AND crop/resize to 3840x2160 (2x input resolution).
I don't understand, why i did not recognize it before. Maybe i had somewhere another filter activ, which did make it work. I don't know. Strange.
But here is the error:
And here the preview:Code:2026-06-28 21:29:00.184 Plugin C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll is using API3 which is deprecated and will be removed shortly. Plugin C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll is using API3 which is deprecated and will be removed shortly. 2026-06-28 21:29:01.157 Failed to evaluate the script: Python exception: Convolution: Input clip must be constant format 8..16 bit integer or 32 bit float, passed RGBH. Traceback (most recent call last): File "vapoursynth.pyx", line 3623, in vapoursynth._vpy_evaluate File "vapoursynth.pyx", line 3624, in vapoursynth._vpy_evaluate File "C:\Users\Gaming-Tower\Documents\Hybrid\Tempfolder\tempPreviewVapoursynthFile21_28_59_366.vpy", line 62, in clipMask = masked.kirsch(src=clipMask) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Hybrid\64bit\vsscripts\masked.py", line 38, in kirsch c = [src.std.Convolution((w[:4]+[0]+w[4:]), saturate=False) for w in weights] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "vapoursynth.pyx", line 3353, in vapoursynth.Function.__call__ vapoursynth.Error: Convolution: Input clip must be constant format 8..16 bit integer or 32 bit float, passed RGBH.
This is the working preview, when i do not use "crop/resize", so let it on auto:Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/libvs_placebo.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import masked from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRT clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRT clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # resizing using VSMLRT, target: 3840x2160 from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=1)) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) clipMask = clip ## Starting applying 'KirschEdgeMask' masked filtering for vsGLSLThinLine # Creating mask for clip clipMask = masked.kirsch(src=clipMask) clipMask = core.resize.Bicubic(clip=clipMask, format=vs.GRAY16, matrix_s="709", range_in_s="full", range_s="full") clipFiltered = clip # adjusting color space from RGBH to YUV444P16 for vsGLSLThinLine clipFiltered = core.resize.Bicubic(clip=clipFiltered, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full") # Line thinning using GLSL Anime4K-Thin with open("C:/Program Files/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Thin_HQ.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define STRENGTH 0.6', '#define STRENGTH 0.2') glsl = glsl.replace('#define ITERATIONS 1', '#define ITERATIONS 1') clipFiltered = core.placebo.Shader(clipFiltered, shader_s=glsl, width=clipFiltered.width, height=clipFiltered.height) # adjusting clip color before mask merge clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full") # Resolution: clip: 3840x2160 and clipFiltered: 3840x2160 and clipMask: 3840x2160 # Merging: clip and clipFiltered based on clipMask clip = core.std.MaskedMerge(clip, clipFiltered, clipMask) # KirschEdgeMask ## Finished applying 'KirschEdgeMask' masked filtering for vsGLSLThinLine # adjusting output color from YUV444P16 to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 3840x2160, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.28.1
And this is the preview, when i use crop/resize, but only inputresolution (which also works):Code:# Imports import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/libvs_placebo.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import masked import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive clipMask = clip ## Starting applying 'KirschEdgeMask' masked filtering for vsGLSLThinLine # Creating mask for clip clipMask = core.std.ShufflePlanes(clips=[clipMask], planes=[0], colorfamily=vs.GRAY) clipMask = masked.kirsch(src=clipMask) clipMask = core.std.ShufflePlanes(clips=[clipMask], planes=[0], colorfamily=vs.GRAY) clipFiltered = clip # adjusting color space from YUV420P8 to YUV444P16 for vsGLSLThinLine clipFiltered = core.resize.Bicubic(clip=clipFiltered, format=vs.YUV444P16) # Line thinning using GLSL Anime4K-Thin with open("C:/Program Files/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Thin_HQ.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define STRENGTH 0.6', '#define STRENGTH 0.2') glsl = glsl.replace('#define ITERATIONS 1', '#define ITERATIONS 1') clipFiltered = core.placebo.Shader(clipFiltered, shader_s=glsl, width=clipFiltered.width, height=clipFiltered.height) # adjusting clip color before mask merge clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16) # adjusting mask before mask merge clipMask = core.resize.Bicubic(clip=clipMask, format=vs.GRAY16, range_in_s="limited") # Resolution: clip: 1920x1080 and clipFiltered: 1920x1080 and clipMask: 1920x1080 # Merging: clip and clipFiltered based on clipMask clip = core.std.MaskedMerge(clip, clipFiltered, clipMask) # KirschEdgeMask ## Finished applying 'KirschEdgeMask' masked filtering for vsGLSLThinLine # adjusting output color from YUV444P16 to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, dither_type="error_diffusion") # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.28.1
Code:# Imports import logging import site import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) os.environ["CUDA_MODULE_LOADING"] = "LAZY" # Force logging to std:err logging.StreamHandler(sys.stderr) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/libvs_placebo.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/vszip/vszip.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vs-mlrt/vstrt.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/fmtconv.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import masked from importlib.machinery import SourceFileLoader vsmlrt = SourceFileLoader('vsmlrt', 'C:/Program Files/Hybrid/64bit/vs-mlrt/vsmlrt.py').load_module() import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # changing range from limited to full range for vsVSMLRT clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL}) # adjusting color space from YUV420P8 to RGBH for vsVSMLRT clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", range_s="full") # resizing using VSMLRT, target: 1920x1080 from vsmlrt import Backend clip = vsmlrt.inference([clip], network_path="C:/Program Files/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_fp32.onnx", backend=Backend.TRT(fp16=True,device_id=0,bf16=False,use_cuda_graph=False,num_streams=2,verbose=True,builder_optimization_level=3,engine_folder="C:/Users/Gaming-Tower/Documents/Hybrid/Engine-Files",output_format=1)) # resizing 3840x2160 to 1920x1080 clip = core.resize.Bicubic(clip=clip, format=vs.RGBS) clip = core.fmtc.resample(clip, w=1920, h=1080, kernel="spline64", interlaced=False, interlacedd=False) # making sure 0-1 limits are respected clip = core.vszip.Limiter(clip=clip, min=[0,0,0], max=[1,1,1]) clipMask = clip ## Starting applying 'KirschEdgeMask' masked filtering for vsGLSLThinLine # Creating mask for clip clipMask = masked.kirsch(src=clipMask) clipMask = core.resize.Bicubic(clip=clipMask, format=vs.GRAY16, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") clipFiltered = clip # adjusting color space from RGBS to YUV444P16 for vsGLSLThinLine clipFiltered = core.resize.Bicubic(clip=clipFiltered, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # Line thinning using GLSL Anime4K-Thin with open("C:/Program Files/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Thin_HQ.glsl") as glslf: glsl = glslf.read() glsl = glsl.replace('#define STRENGTH 0.6', '#define STRENGTH 0.2') glsl = glsl.replace('#define ITERATIONS 1', '#define ITERATIONS 1') clipFiltered = core.placebo.Shader(clipFiltered, shader_s=glsl, width=clipFiltered.width, height=clipFiltered.height) # adjusting clip color before mask merge clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, matrix_s="709", range_in_s="full", range_s="full", dither_type="error_diffusion") # Resolution: clip: 1920x1080 and clipFiltered: 1920x1080 and clipMask: 1920x1080 # Merging: clip and clipFiltered based on clipMask clip = core.std.MaskedMerge(clip, clipFiltered, clipMask) # KirschEdgeMask ## Finished applying 'KirschEdgeMask' masked filtering for vsGLSLThinLine # adjusting output color from YUV444P16 to YUV420P8 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, dither_type="error_diffusion") # changing range from full to limited range for matching filter target luma scale clip = core.resize.Bicubic(clip, format=vs.YUV420P8,range_in_s="full", range_s="limited") # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.28.1 -
Ok, i did now test it and now it should really work. Testet it before and after upscaling with and without input-resolution-increase and with and without sharpening between. It works now.
Thank you.
Und viel spass auf dem Festival dann in dem Fall! -
I did encounter another "Bug" (or incompatibility since some new TensorRT Update i guess): Temporalfix. You don't have to fix it for sure now when you go on a festival, just telling you.
So basicaly: Temporalfix does not work with newer TensoRT anymore (it worked some weeks ago). I just started a fresh Hybrid window and uses only temporalfix with torch. Nothing else.
I did upload the error as file, because it is 50k long. The LLM says this to it:
Ps: It works with Cuda as Backend. So it is really TensorRT i guess.Der kritische Fehler steht ganz am Ende des stderr:
plain
[06/29/2026-11:31:47] [E] Invalid TensorFormat fp16:chw
Das ist der eigentliche Fehler. TensorRT 11.1 akzeptiert das Format fp16:chw nicht mehr als gültigen TensorFormat-String.
Was passiert hier?
vs_temporalfix generiert diesen trtexec-Befehl:
plain
--inputIOFormats=fp16:chw --outputIOFormats=fp16:chw
Aber TensorRT 11.1 hat die Format-Syntax geändert. Laut der trtexec-Hilfe im Log sind gültige Formate:
chw, chw2, hwc8, chw4, chw16, chw32, dhwc8, cdhw32, hwc, dla_linear, dla_hwc4, hwc16, dhwc
Ohne fp16: Prefix! Das fp16: ist die alte Syntax, die TensorRT 11 nicht mehr akzeptiert.
Warum trat das jetzt auf?
Du hast vermutlich kürzlich TensorRT aktualisiert (z.B. durch ein Hybrid-Update oder manuelle Installation). Vorher hattest du eine ältere TensorRT-Version (8.x oder 9.x), die fp16:chw noch akzeptiert hat. Jetzt läuft TensorRT 11.1, und die ist strikter. -
This is not a Hybrid bug, but an incompatibility of vs_temportalfix with latest vs-mlrt.
Ideally vs_temporalfix needs to adjust the trtexec for the new syntax.
Nothing I can do about it.
=> Best report it to https://github.com/pifroggi/vs_temporalfixusers currently on my ignore list: deadrats, Stears555, marcorocchini -
I found an error on HQDering (i guess incompatibiltiy with newer vapoursynth-Versions). Just reporting it. NO hurry!
Here is the preview:2026-06-30 16:52:03.261
Plugin C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/CTMF/CTMF.dll is using API3 which is deprecated and will be removed shortly.
Plugin C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll is using API3 which is deprecated and will be removed shortly.
2026-06-30 16:52:03.888
Failed to evaluate the script:
Python exception: No attribute with the name misc exists. Did you mistype a plugin namespace or forget to install a plugin?
Traceback (most recent call last):
File "vapoursynth.pyx", line 3623, in vapoursynth._vpy_evaluate
File "vapoursynth.pyx", line 3624, in vapoursynth._vpy_evaluate
File "C:\Users\Gaming-Tower\Documents\Hybrid\Tempfolder\tempPreviewVapoursynthFile16_52_01_775 .vpy", line 40, in
clip = dering.HQDeringmod(clip, nrmode=2, darkthr=3.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Hybrid\64bit\vsscripts\dering.py", line 177, in HQDeringmod
fmask = core.misc.Hysteresis(prewittm.zsmooth.Median(plane s=0), prewittm, planes=0) if has_zsmooth else core.misc.Hysteresis(prewittm.std.Median(planes=0) , prewittm, planes=0)
^^^^^^^^^
File "vapoursynth.pyx", line 3117, in vapoursynth._CoreProxy.__getattr__
File "vapoursynth.pyx", line 2933, in vapoursynth.Core.__getattr__
AttributeError: No attribute with the name misc exists. Did you mistype a plugin namespace or forget to install a plugin?
LLM says:Code:# Imports import sys import os import vapoursynth as vs # getting Vapoursynth core core = vs.core # Import scripts folder scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) # loading plugins core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/CTMF/CTMF.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/hysteresis/hysteresis.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/akarin/libakarin.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/Vapoursynth/Lib/site-packages/vapoursynth/plugins2/zsmooth/zsmooth.dll") core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import dering import validate # Source: 'C:\Users\Gaming-Tower\Videos\test.mkv' # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Source) # Loading 'C:\Users\Gaming-Tower\Videos\test.mkvÄ using LWLibavSource clip = core.lsmas.LWLibavSource(source="C:/Users/Gaming-Tower/Videos/test.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) frame = clip.get_frame(0) # setting color matrix to 709. clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709) # setting color transfer (vs.TRANSFER_BT709), if it is not set. if validate.transferIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709) # setting color primaries info (to vs.PRIMARIES_BT709), if it is not set. if validate.primariesIsInvalid(clip): clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709) # setting color range to TV (limited) range. prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange' clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED}) # making sure frame rate is set to 23.976fps clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive # deringing using HQDeringmod clip = dering.HQDeringmod(clip, nrmode=2, darkthr=3.0) # set output frame rate to 23.976fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001) # output clip.set_output() # clip current meta; color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 23.976, color matrix: 709, color primaries: Unspecific, color transfer: Unspecified, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta) # script was created by Hybrid 2026.06.28.1
Der Fehler entsteht, weil die Entwickler-Skripte nicht ganz synchron zu den geladenen Plugins laufen:
Der Absturzort: In der VapourSynth-Skriptdatei dering.py (die für den HQDeringmod verantwortlich ist) wird in Zeile 177 versucht, die Funktion core.misc.Hysteresis aufzurufen.
Die Ursache: In älteren VapourSynth-Versionen gab es eine Plugin-Kategorie namens misc (Miscellaneous), in der sich der Filter Hysteresis befand.
Der aktuelle Zustand: In deinem Log sieht man, dass Hybrid nun eine separate, eigenständige Plugin-Datei lädt: .../hysteresis/hysteresis.dll. Diese neue DLL registriert ihre Befehle höchstwahrscheinlich unter einem neuen Namespace (vermutlich core.hysteresis) und nicht mehr unter dem alten core.misc.
Das Resultat: Das Python-Skript (dering.py) sucht immer noch am alten Ort (misc), findet den Filter dort nicht und stürzt korrekterweise mit dem Fehler No attribute with the name misc exists ab. -
replacing dering.py with the new one from https://github.com/Selur/VapoursynthScriptsInHybrid/blob/master/dering.py should fix the problem.
users currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
-
vp9 vs x265 vs DivX265
By deadrats in forum Video ConversionReplies: 14Last Post: 28th Jun 2015, 09:48 -
HEVC-x265 player in linux?
By racer-x in forum LinuxReplies: 4Last Post: 20th Mar 2014, 18:10 -
Hybrid [x264/XViD - MKV/MP4] Converter Support Thread
By Bonie81 in forum Video ConversionReplies: 6Last Post: 8th Jan 2013, 03:53 -
VP8 vs x264
By Selur in forum Video ConversionReplies: 14Last Post: 14th Apr 2012, 07:48 -
How often do you reinstall your operating system(windows,mac,linux etc..)?
By johns0 in forum PollsReplies: 28Last Post: 22nd Jan 2011, 17:14


Quote