This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] Things went wrong after saving global profile with VS yuv420 chroma location left
#16
Quote:Did you:
a. clear the engine folder?
b. check the Vapoursynth Preview?

Yes, clear the engine folder for every single testing run. And had ms defender disabled completely.

And maybe silly question: what should I do with VS preview? Should I post the error msgs of VS preview here?

When using DPIRDenoise(mlrt)(TensorRT), the VS preview looks ok, not much to tell, just the encode speed is not good.

When using DPIRDenoise(mlrt)(TensorRT FP16), error happens, in the VS preview window the scripts are:

Quote:# Imports
import logging
import site
import sys
import os
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'D:/APPD/Hybrid_dev_20260621-83629/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="D:/APPD/Hybrid_dev_20260621-83629/64bit/vs-mlrt/vstrt.dll")
core.std.LoadPlugin(path="D:/APPD/Hybrid_dev_20260621-83629/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
from importlib.machinery import SourceFileLoader
vsmlrt = SourceFileLoader('vsmlrt', 'D:/APPD/Hybrid_dev_20260621-83629/64bit/vs-mlrt/vsmlrt.py').load_module()
from vsmlrt import Backend
import validate
# Source: 'C:\Users\mmddffkk\Desktop\tmp\testfile.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\mmddffkk\Desktop\tmp\testfile.mkvÄ using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/mmddffkk/Desktop/tmp/testfile.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 vsDPIRmlrtDenoise
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 vsDPIRmlrtDenoise
clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_in_s="full", chromaloc=0)
# denoising using DPIR (mlrt)
clip = vsmlrt.DPIR(clip, strength=100.000, overlap=16, model=1, backend=Backend.TRT(fp16=True,device_id=0,bf16=False,verbose=True,use_cuda_graph=False,num_streams=1,builder_optimization_level=1,engine_folder="D:/APPD/HybridFiles/Engine"))
# adjusting output color from RGBH to YUV420P10 for SvtAv1Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, 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.YUV420P10,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: YUV420P10, bit depth: 10, 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.21.1

The error msgs of preview window are:

Quote:2026-06-21 20:50:46.908
Plugin D:/APPD/Hybrid_dev_20260621-83629/64bit/vs-mlrt/vstrt.dll is using API3 which is deprecated and will be removed shortly.
Plugin D:/APPD/Hybrid_dev_20260621-83629/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll is using API3 which is deprecated and will be removed shortly.
2026-06-21 20:50:47.185
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 "D:\APPD\HybridFiles\Temp\tempPreviewVapoursynthFile20_50_46_294.vpy", line 51, in
clip = vsmlrt.DPIR(clip, strength=100.000, overlap=16, model=1, backend=Backend.TRT(fp16=True,device_id=0,bf16=False,verbose=True,use_cuda_graph=False,num_streams=1,builder_optimization_level=1,engine_folder="D:/APPD/HybridFiles/Engine"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:/APPD/Hybrid_dev_20260621-83629/64bit/vs-mlrt/vsmlrt.py", line 599, in DPIR
clip = inference_with_fallback(
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:/APPD/Hybrid_dev_20260621-83629/64bit/vs-mlrt/vsmlrt.py", line 3110, in inference_with_fallback
raise e
File "D:/APPD/Hybrid_dev_20260621-83629/64bit/vs-mlrt/vsmlrt.py", line 3087, in inference_with_fallback
ret = _inference(
^^^^^^^^^^^
File "D:/APPD/Hybrid_dev_20260621-83629/64bit/vs-mlrt/vsmlrt.py", line 2904, in _inference
engine_path = trtexec(
^^^^^^^^
File "D:/APPD/Hybrid_dev_20260621-83629/64bit/vs-mlrt/vsmlrt.py", line 2087, in trtexec
convert_model(
File "D:/APPD/Hybrid_dev_20260621-83629/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



About file loading, the step is

1. Launch Hybrid.
2. Load a file which "might" cause the error.
3. After loading complete, load the same file again. Now the error happens.

If the file is 25 fps, the error will not happen at all.

and here's the sample:

testsample1 (23.976fps untouched bluray mkv src, cutted by avidemux)
testsample2 (30 fps uncut youtube full sequence DLed by yt-dlp)

You can try loading sample2, than sample1, no error on my machine, and the loading after that will be always ok.
If sample1 first, sample2 second, error happens, and the loading after that will always have error.
Reply


Messages In This Thread
RE: Things went wrong after saving global profile with VS yuv420 chroma location left - by andrewschen - 21.06.2026, 16:04

Forum Jump:


Users browsing this thread: 1 Guest(s)