Selur's Little Message Board
[BUG] Merge mask not more working - 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: [BUG] Merge mask not more working (/thread-3530.html)



Merge mask not more working - Dan64 - 05.01.2024

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


RE: Merge mask not more working - Selur - 05.01.2024

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.


RE: Merge mask not more working - Selur - 05.01.2024

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


RE: Merge mask not more working - Dan64 - 05.01.2024

(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).


RE: Merge mask not more working - Selur - 05.01.2024

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.


RE: Merge mask not more working - Selur - 05.01.2024

Send you a link to a dev version which hopefully does fix the problem.

Cu Selur


RE: Merge mask not more working - Dan64 - 05.01.2024

The last dev version is woking!

Thanks,
Dan