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.

[BUG] Weighted Resize ALL - not working
#1
Hello Selur,

   I'm using Hybrid dev-version 2023.10.21.1, and I noted that Weighted Resize "Mode: ALL" using the resizer RealESRGAN is not working any more.
   Fortunately it is working if I use "Mode: SPLIT".
   I attached the 2 generated scripts, they are almost the same,  the only main difference is that the following command

    clip = core.std.Merge(clipa=clipSmoothed,clipb=clip,weight=0.5)

   is replaced by the following command in the "Split" version

clip = core.resize.Bicubic(clip=clip, format=vs.YUV444PS, matrix_s="709", range_s="limited")
clipSmoothed = core.resize.Bicubic(clip=clipSmoothed, format=vs.YUV444PS, matrix_s="709", range_s="limited")
clip = core.std.Merge(clipa=clipSmoothed,clipb=clip,weight=[0.5,0.5,0.5])

   in effect the raised error is the following:  Merge: both clips must have the same constant format and dimensions, passed YUV420P16[1920x760] and RGBS[1920x760]

Dan
Reply
#2
Seems like I broke and fixed that, since using my current dev, I get:

for 'mode=all':
# no resizing since resolution is already archived
from vsrealesrgan import realesrgan as RealESRGAN
# adjusting color space from YUV420P8 to RGBS for vsRealESRGAN
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# resizing using RealESRGAN
clip = RealESRGAN(clip=clip, device_index=0) # 2560x1408
# resizing 2560x1408 to 640x352
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=640, h=352, kernel="spline64", interlaced=False, interlacedd=False)
clipSmoothed = core.resize.Bicubic(clip=clipSmoothed, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
clip = core.std.Merge(clipa=clipSmoothed,clipb=clip,weight=0.5)
# Weighted resize - END
and for 'mode = split':
# no resizing since resolution is already archived
from vsrealesrgan import realesrgan as RealESRGAN
# adjusting color space from YUV420P8 to RGBS for vsRealESRGAN
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# resizing using RealESRGAN
clip = RealESRGAN(clip=clip, device_index=0) # 2560x1408
# resizing 2560x1408 to 640x352
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=640, h=352, kernel="spline64", interlaced=False, interlacedd=False)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444PS, matrix_s="470bg", range_s="limited")
clipSmoothed = core.resize.Bicubic(clip=clipSmoothed, format=vs.YUV444PS, range_s="limited")
clip = core.std.Merge(clipa=clipSmoothed,clipb=clip,weight=[0.5,0.5,0.5])
# Weighted resize - END
and both seem to work fine here.
=> send you a link for testing. (upload still running, will be finished in 5min)

Cu Selur
Reply
#3
The last dev-version is working!

Thanks,
Dan
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)