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] Merge mask not more working
#1
Hello Selur,

  I'm using Hybrid 2023.12.02.1. 
  I enabled the Vapoursynth->Misc->UI->Show "Merge"-controls
  But the merge is not more working.
  
  The generated code is the following

mergeClip = clip
## Starting applying 'limit' masked filtering for vsCodeFormer
mergeClipMask = mergeClip
mergeClipMask = core.resize.Bicubic(clip=mergeClipMask, format=vs.RGB24, matrix_in_s="709", range_s="limited", dither_type="error_diffusion")
mergeClipMask = core.resize.Bicubic(clip=mergeClipMask, format=vs.GRAY8, matrix_s="709", range_s="limited")
mergeClipMask = core.std.BinarizeMask(mergeClipMask, 60)
mergeClipFiltered = mergeClip
# changing range from limited to full range
mergeClipFiltered = core.resize.Bicubic(mergeClipFiltered, range_in_s="limited", range_s="full")
# Setting color range to PC (full) range.
mergeClipFiltered = core.std.SetFrameProp(clip=mergeClipFiltered, prop="_ColorRange", intval=0)
# adjusting color space from YUV420P10 to RGB24 for vsCodeFormer
mergeClipFiltered = core.resize.Bicubic(clip=mergeClipFiltered, format=vs.RGB24, matrix_in_s="709", range_s="full", dither_type="error_diffusion")
# Blind Face Restoration using CodeFormer
from vscodeformer import codeformer as CodeFormer
mergeClipFiltered = CodeFormer(clip=mergeClipFiltered, upscale=1, weight=0.800) # 1280x692
# changing range from full to limited range
mergeClipFiltered = core.resize.Bicubic(mergeClipFiltered, range_in_s="full", range_s="limited")
mergeClipFiltered = core.resize.Bicubic(clip=mergeClipFiltered, format=vs.YUV444P8, matrix_s="709", range_s="limited")
clipfiltered = core.resize.Bicubic(clip=clipfiltered, format=vs.YUV444P8, range_s="limited")
clipfiltered = core.std.Merge(mergeClipFiltered,clipfiltered,[0.5, 0.5, 0.5]) # merge filtered and unfiltered by plane
mergeClip = core.resize.Bicubic(clip=mergeClip, format=vs.YUV444P8, range_s="limited", dither_type="error_diffusion")
mergeClipMask = core.resize.Bicubic(clip=mergeClipMask, format=vs.YUV444P8, range_s="limited")
mergeClip = core.std.MaskedMerge(mergeClip, mergeClipFiltered, mergeClipMask) # LimitMask
## Finished applying 'LimitMask' masked filtering for vsCodeFormer

  As you can see there is a reference to "clipfiltered" but this variable was never defined.

  Moreover I'm not sure that this merge will work as the "weighted" resizer with method "simple weight" that was introduced within the "Resize" page.

  Could you check ?

Thanks,
Dan
Reply
#2
I will look at it.
Seems to be the combination of Masked&Merge for one filter is causeing the problem.
Each on their own works fine here.
--- mainly offline 20.-26 of May ---
Reply
#3
Quote: Moreover I'm not sure that this merge will work as the "weighted" resizer with method "simple weight" that was introduced within the "Resize" page.
This merge, merges the filtered and the unfiltered version.
So 0.5 would take half or each plane from the unfiltered and the filtered version.

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#4
(05.01.2024, 18:22)Selur Wrote: I will look at it.
Seems to be the combination of Masked&Merge for one filter is causeing the problem.
Each on their own works fine here.

In effect the problem arise when I switch from "Masked" to "Merge". If I select "Merge" and set it as default setting and then restart the app, this problem do not arise any more.
Now I defined "Merge" as default setting and it is working properly (after restart).
Reply
#5
Quote:In effect the problem arise when I switch from "Masked" to "Merge"
If that means both are enabled then, then I agree, otherwise I have no clue what you are trying to say.
--- mainly offline 20.-26 of May ---
Reply
#6
Send you a link to a dev version which hopefully does fix the problem.

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#7
The last dev version is woking!

Thanks,
Dan
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)