Today, 03:08
@Dan64: Can you look at the code what could cause problems when ProPainter is called twice in a single script?
Using this script:
with this video and mask
Either the left or right logo is removed properly and the other isn't.
Using:
followed by:
only the right logo is removed properly.
Switching the order, only the left logo is properly removed.
---
I'll look at why Hybrid does this unnecessary conversion:
(I'm pretty sure I know how this happens,... I probably forgot to update the current TV scale value somewhere.)
Cu Selur
Ps.: going to bed now.
Using this script:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import sys
import os
core = vs.core
# Limit frame cache to 48449MB
core.max_cache_size = 48449
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# loading plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/DGDecNV/DGDecodeNV_AVX2.dll")
# Import scripts
import validate
# Source: 'C:\Users\Selur\Desktop\Test_Video_2.mp4'
# Current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, frame rate: 25fps, scanorder: progressive, yuv luminance scale: limited, matrix: 709, transfer: bt.709, primaries: bt.709, format: HEVC
# Loading 'C:\Users\Selur\Desktop\Test_Video_2.mp4' using DGSource
clip = core.dgdecodenv.DGSource("J:/tmp/mp4_ba4dcf39836d47afe99685c577b7f350_853323747.dgi") # 25 fps, scanorder: progressive
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.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_LIMITED)
# making sure frame rate is set to 25fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# 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 vsProPainter
clip = core.resize.Bicubic(clip, format=vs.YUV420P8, 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 YUV420P8 to RGB24 for vsProPainter
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="709", range_in_s="full", range_s="full")
# Inpainting using ProPainter
from vspropainter import propainter as ProPainter
clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.png", length=500, mask_region=(520,256,1400,0))
# changing range from full to limited range for vsProPainter
clip = core.resize.Bicubic(clip, format=vs.RGB24,range_in_s="full", range_s="limited")
# changing range from limited to full range for vsProPainter
clip = core.resize.Bicubic(clip, format=vs.RGB24, range_in_s="limited", range_s="full")
# Inpainting using ProPainter
clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.png", length=500, mask_region=(256,256,0,0))
# changing range from full to limited range for vsProPainter
clip = core.resize.Bicubic(clip, format=vs.RGB24,range_in_s="full", range_s="limited")
# adjusting output color from RGB24 to YUV420P10 for NVEncModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", range_in_s="full", range_s="limited") # additional resize to match target color sampling
# set output frame rate to 25fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# output
clip.set_output()
# script was created by Hybrid 2025.12.29.1Either the left or right logo is removed properly and the other isn't.
Using:
clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.png", length=500, mask_region=(520,256,1400,0))clip = ProPainter(clip, img_mask_path="C:/Users/Selur/Desktop/mask.png", length=500, mask_region=(256,256,0,0))Switching the order, only the left logo is properly removed.
---
I'll look at why Hybrid does this unnecessary conversion:
# changing range from full to limited range for vsProPainter
clip = core.resize.Bicubic(clip, format=vs.RGB24,range_in_s="full", range_s="limited")
# changing range from limited to full range for vsProPainter
clip = core.resize.Bicubic(clip, format=vs.RGB24, range_in_s="limited", range_s="full")Cu Selur
Ps.: going to bed now.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.


