5 hours ago
(9 hours ago)Selur Wrote:Quote:This makes no sense. the operations do not result in 6832x3840.Hybrid takes the scaling from the name! "Xx_...."
If the name does not start with '<Number>x_', Hybrd assumes 4x, so this is correct.
Well that explains that then. Renaming the File seems fine now, can we please get an option to remove the padding and final resize ?
Current build:
This:
clip = core.std.AddBorders(clip=clip, left=2, right=2, top=0, bottom=0) # add borders to archive mod 8 (vsVSMLRT) - 856x480
And this:
# resizing 3416x1920 to resize resolution 3408x1920 section.
clip = core.std.AddBorders(clip=clip, left=2, right=2, top=0, bottom=0) # add borders to archive mod 8 (vsVSMLRT) - 856x480
# changing range from limited to full range for vsVSMLRT
clip = core.resize.Bicubic(clip, range_in_s="limited", range_s="full")
# setting color range to PC (full) range.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_FULL)
# adjusting color space from YUV420P10 to RGBH for vsVSMLRT
clip = core.resize.Bicubic(clip=clip, format=vs.RGBH, matrix_in_s="709", range_s="full")
# resizing using VSMLRT, target: 3408x1920
clipref = clip
from vsmlrt import Backend
clip = vsmlrt.inference([clip],network_path="I:/AI_Upscale/Tools/Hybrid/64bit/onnx_models/2x_Ani4Kv2_G6i2_Compact_107500_FP16.onnx", backend=Backend.TRT(fp16=True,device_id=0,num_streams=1,verbose=True,use_cuda_graph=False,workspace=1073741824,builder_optimization_level=3,engine_folder="C:/Users/Kristijan1001/AppData/Local/Temp")) # 1712x960
clip = vsmlrt.inference([clip],network_path="I:/AI_Upscale/Tools/Hybrid/64bit/onnx_models/2x_cugan_pro-denoise3x-up2x_op18_fp16_clamp_colorfix.onnx", backend=Backend.TRT(fp16=True,device_id=0,num_streams=1,verbose=True,use_cuda_graph=False,workspace=1073741824,builder_optimization_level=3,engine_folder="C:/Users/Kristijan1001/AppData/Local/Temp")) # 3424x1920
clip = core.std.Crop(clip=clip, left=4, right=4, top=0, bottom=0) # removing borders (vsVSMLRT) - 3416x1920
# resizing 3416x1920 to resize resolution 3408x1920
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, range_s="full")
clip = core.fmtc.resample(clip=clip, w=3408, h=1920, kernel="spline64", interlaced=False, interlacedd=False)
clipref = core.resize.Bicubic(clip=clipref, format=vs.RGBS, range_s="full")
# fixing colors with ColorFix
clip = vs_colorfix.average(clip=clip, ref=clipref, radius=10, fast=False)
# changing range from full to limited range for vsVSMLRT
clip = core.resize.Bicubic(clip, range_in_s="full", range_s="limited")
# adjusting output color from: RGBS to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_s="limited", dither_type="error_diffusion")
# set output frame rate to 29.97fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# output
clip.set_output()