![]() |
|
[HELP] Things went wrong after saving global profile with VS yuv420 chroma location left - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html) +--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html) +--- Thread: [HELP] Things went wrong after saving global profile with VS yuv420 chroma location left (/thread-4424.html) |
RE: Things went wrong after saving global profile with VS yuv420 chroma location left - Selur - 21.06.2026 HybridDebugOutput-LoadingFileErrorWindowBox(DebugEnabledByDefault) -> locally fixed here. HybridDebugOutput-DPIRdenoise(mlrt)only -> I see the problem. Hybrid things Vapoursynth isn't needed and thus doesn't use it. But no clue why so far. Couldn't reproduce this here, but rewrote some code which should either show what is causing this or fix the problem. => Uploaded a new dev (Hybrid_dev_2026.06.21-7454). Quote:Encoding with SCUNet(mlrt)(TensorRT). Works ok at 1.5 fps. Was up to 3~4 fps before.Speed change might be due to driver or vs-mlrt changes, or changes in Vapoursynth itself. Side note: Make sure to add your engine, tmp, output folder to be exempted by any virus scanner and similar on your system otherwise they might cause slow downs. I didn't change anything that should affect the speed in Hybrid. About the 5kb file: # 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_20260620-20172/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_20260620-20172/64bit/vsfilters/SharpenFilter/CAS/CAS.dll")
core.std.LoadPlugin(path="D:/APPD/Hybrid_dev_20260620-20172/64bit/vs-mlrt/vstrt.dll")
core.std.LoadPlugin(path="D:/APPD/Hybrid_dev_20260620-20172/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
from importlib.machinery import SourceFileLoader
vsmlrt = SourceFileLoader('vsmlrt', 'D:/APPD/Hybrid_dev_20260620-20172/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=5.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=3,engine_folder="D:/APPD/HybridFiles/Engine"))
# adjusting color space from RGBH to RGB48 for vsCAS
clip = core.resize.Bicubic(clip=clip, format=vs.RGB48)
# contrast sharpening using CAS
clip = core.cas.CAS(clip)
# adjusting output color from RGB48 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)"D:\APPD\Hybrid_dev_20260620-20172\64bit\Vapoursynth\Lib\site-packages\vapoursynth\vspipe.exe" "D:\APPD\HybridFiles\Temp\encodingTempSynthSkript_2026-06-21@08_36_34_0310_0.vpy" - --outputindex 0 -c y4m | "D:\APPD\Hybrid_dev_20260620-20172\64bit\SvtAv1EncApp.exe" --input stdin --width 1920 --height 1080 --fps-num 24000 --fps-denom 1001 --input-depth 10 --profile 0 --tile-rows 0 --tile-columns 0 --progress 2 --rc 0 --crf 35 --mbr 0 --aq-mode 2 --tf-strength 3 --luminance-qp-bias 0 --sharpness 0 --sharpness 0 --sharpness 0 --ac-bias 0 --preset 10 --matrix-coefficients 1 --color-range 0 --output "D:\APPD\HybridFiles\Temp\2026-06-21@08_36_34_0310_02.av1"=> check that the Vapoursynth Preview works. HybridDebugOutput-Minidump(Launch&Exit,DebugEnabledByDefault) => no clue, can't reproduce this here. The CrashDump only shows that it happens during closing of Hybrid, so there might still be something that is deleted twice or similar,... => Can you give me a step-by-step with the new dev what you do after resetting the defaults to get a CrashDump. Cu Selur RE: Things went wrong after saving global profile with VS yuv420 chroma location left - Selur - 21.06.2026 Okay, I found a bug in QSVEncModel, which wouldn't be created on my system, so that might explain why I can't reproduce the problem. ![]() => Uploaded a new dev (Hybrid_dev_2026.06.21-81218), let me know whether this one fixed the CrashDump-issue for you. (Otherwise I need a step-by-step on how to reproduce this) Cu Selur RE: Things went wrong after saving global profile with VS yuv420 chroma location left - Selur - 21.06.2026 Uploaded a new dev which fixes the multiple '--sharpness X' entries in the SVTAV1 command line. (I doubt this was causing any of your issues, since the encoder only reported a warning, that the additional options did get ignored) => updated dev to Hybrid_dev_2026.06.21-83629 Cu Selur RE: Things went wrong after saving global profile with VS yuv420 chroma location left - andrewschen - 21.06.2026 Thanks for all the effort! Tested the Hybrid_dev_2026.06.21-83629: File loading error: not fully fixed Content of the file seems relevant. Usually I tested on files cutted out from bluray or x264/x265 mkv source by avidemux, and it will happen if I load the same file twice. If I load different cutted file every time when I loading file, for maybe 3 or more rounds, then try loading same file again, the error suddenly completely disappear, even for file which causes the error originally. Loading the untouched bluray mkv will not cause the error. And I tested loading files downloaded from youtube by yt-dlp (webm / mp4), sometimes error happens, sometimes not. Can't find the rules yet. So basically if I can load file for at least more than 3 times with no error, than the error disappear completely after that. Crashdump: fixed DPIRDenoise / SCUNet: not fixed RE: Things went wrong after saving global profile with VS yuv420 chroma location left - Selur - 21.06.2026 Quote:DPIRDenoise / SCUNetDid you: a. clear the engine folder? b. check the Vapoursynth Preview? Quote:File loading errorNeed a sample and a step-by-step. Cu Selur RE: Things went wrong after saving global profile with VS yuv420 chroma location left - andrewschen - 21.06.2026 Quote:Did you: 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 The error msgs of preview window are: Quote:2026-06-21 20:50:46.908 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. RE: Things went wrong after saving global profile with VS yuv420 chroma location left - Selur - 21.06.2026 Quote: When using DPIRDenoise(mlrt)(TensorRT FP16), error happens, in the VS preview window the scripts are:Looking at the DPIR call: 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"))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=> sadly there is nothing I can do to fix that, especially since I can't reproduce the problem here. (otherwise I would have reported it to https://github.com/AmusementClub/vs-mlrt) Quote:If sample1 first, sample2 second, error happens, and the loading after that will always have error.=> I can reproduce the problem. Looking into it. Cu Selur RE: Things went wrong after saving global profile with VS yuv420 chroma location left - Selur - 21.06.2026 Quote:If sample1 first, sample2 second, error happens, and the loading after that will always have error.Can you confirm, that this only happens on drag&drop? It seems like when I use the normal open dialog, to open testample1 and after that testsample2 this does not happen. Cu Selur RE: Things went wrong after saving global profile with VS yuv420 chroma location left - andrewschen - 21.06.2026 Quote:Can you confirm, that this only happens on drag&drop? It doesn't matter whether loading file by normal open dialog or drag&drop on my machine, only the file itself matters. RE: Things went wrong after saving global profile with VS yuv420 chroma location left - Selur - 21.06.2026 This happens due to some race condition, where the Vapoursynth script gets refreshed while the input model isn't in a fixed state. Problem is figuring out which thread is the problem,.. Here it does not happen mainly when using drag&drop, but if that is not the case for you the culprit must be somewhere else. As a side note: you can safely ignore this. Cu Selur |