<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.selur.net/index.php?action=history&amp;feed=atom&amp;title=Vapoursynth_ProPainter</id>
	<title>Vapoursynth ProPainter - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.selur.net/index.php?action=history&amp;feed=atom&amp;title=Vapoursynth_ProPainter"/>
	<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_ProPainter&amp;action=history"/>
	<updated>2026-11-20T07:39:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.selur.net/index.php?title=Vapoursynth_ProPainter&amp;diff=592&amp;oldid=prev</id>
		<title>Selur: New filter page (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_ProPainter&amp;diff=592&amp;oldid=prev"/>
		<updated>2026-11-16T08:51:33Z</updated>

		<summary type="html">&lt;p&gt;New filter page (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;ProPainter&amp;#039;&amp;#039;&amp;#039; is a video inpainting network: masked areas such as logos, watermarks, objects or damage are filled with content propagated from other frames. In outpainting mode it extends the frame to a larger size and invents the new borders. It runs on an NVIDIA GPU through PyTorch and needs a lot of resources.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Filtering → Vapoursynth → Other&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Vapoursynth_ProPainter.png|none|ProPainter controls in Hybrid]]&lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
Optical flow between frames is estimated and completed inside the masked area, the known pixels are propagated along that flow, and a transformer fills what is still missing. Because content comes from other frames, a static logo over a moving background is usually replaced well; areas that are never visible are invented. Frames are processed in sequences of &amp;#039;&amp;#039;Length&amp;#039;&amp;#039; frames.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* Windows, Hybrid&amp;#039;s torch add-on and an NVIDIA GPU with CUDA (the CPU can be selected but is very slow).&lt;br /&gt;
* For inpainting a mask: an image of the clip&amp;#039;s size at that point in the filter chain (white = area to fill), a mask video, or a mask generated by Hybrid.&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Control !! Parameter !! Range / values !! Hybrid default !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| Mode || – || inpainting, outpainting || inpainting || Fill masked areas, or extend the frame.&lt;br /&gt;
|-&lt;br /&gt;
| Mask type || img_mask_path, clip_mask || image, video, generated || image || Source of the inpainting mask; without a mask the filter is skipped.&lt;br /&gt;
|-&lt;br /&gt;
| Length || length || 12 – 10000 || 100 || Frames per processed sequence; lower values need less memory but are not faster.&lt;br /&gt;
|-&lt;br /&gt;
| Dilation || mask_dilation || 0 – 32 || 4 || Grows the mask; raise it if the mask misses the edges of the logo.&lt;br /&gt;
|-&lt;br /&gt;
| Enhance || mask_enhance || on/off || on || Inpainting: improves the edges of the mask for better recognition.&lt;br /&gt;
|-&lt;br /&gt;
| Neighbor length || neighbor_length || 1 – 100 || 10 || Local neighbor frames; lower needs less memory, higher can help fast motion.&lt;br /&gt;
|-&lt;br /&gt;
| Ref. Stride || ref_stride || 1 – 100 || 10 || Stride of the global reference frames; higher is faster and needs less memory but can lower the quality.&lt;br /&gt;
|-&lt;br /&gt;
| Raft Iter. || raft_iter || 1 – 100 || 20 || Iterations of the optical flow estimation; lower is faster but can lower the quality.&lt;br /&gt;
|-&lt;br /&gt;
| Mask Region (w, h, x, y) || mask_region || on/off; w/h 128 – 8192 in steps of 8, x/y 0 – 8176 || off; 256, 256, 0, 0 || Processes only this area; much faster on HD material.&lt;br /&gt;
|-&lt;br /&gt;
| Debug || – || on/off || off || Preview only: draws the mask region instead of filtering.&lt;br /&gt;
|-&lt;br /&gt;
| SCThreshold || sc_threshold || 0 – 1 || 0.1 || Scene change threshold used to pick the reference frames; 0 = no scene detection.&lt;br /&gt;
|-&lt;br /&gt;
| SC freq || sc_min_freq || 0 – 1024 || 0 || Inpainting: minimum number of frames between two accepted scene changes (at least 5 when above 0); 0 = no spacing.&lt;br /&gt;
|-&lt;br /&gt;
| FP16 || enable_fp16 || on/off || on || Half precision; faster and needs less memory.&lt;br /&gt;
|-&lt;br /&gt;
| Device || device_index || −1 – 16 || 0 || CUDA device; −1 = CPU.&lt;br /&gt;
|-&lt;br /&gt;
| Inference || inference_mode || on/off || off || Enables torch inference mode.&lt;br /&gt;
|-&lt;br /&gt;
| Outpaint resolution || outpaint_size || 256 – 8192 || 256 × 256 || Outpainting: new frame size; must not be smaller than the current size and must be larger in at least one direction, else the filter is skipped.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Mask image J:/tmp/claude/wiki/assets/logo_mask.png (640x356, white box in the top right corner; no mask is set by default), otherwise default settings, on a 10-bit YUV 4:2:0 source (640x356):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# changing color matrix from &amp;#039;470bg&amp;#039; to &amp;#039;709&amp;#039; for vsProPainter&lt;br /&gt;
clip = core.resize.Bicubic(clip, matrix_in_s=&amp;quot;470bg&amp;quot;, matrix_s=&amp;quot;709&amp;quot;)&lt;br /&gt;
# changing range from limited to full range for vsProPainter&lt;br /&gt;
clip = core.resize.Bicubic(clip, format=vs.YUV420P10, range_in_s=&amp;quot;limited&amp;quot;, range_s=&amp;quot;full&amp;quot;)&lt;br /&gt;
# setting color range to PC (full) range.&lt;br /&gt;
prop_name = &amp;#039;_Range&amp;#039; if core.core_version.release_major &amp;gt;= 74 else &amp;#039;_ColorRange&amp;#039;&lt;br /&gt;
clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_FULL})&lt;br /&gt;
# Inpainting using ProPainter&lt;br /&gt;
from vspropainter import propainter as ProPainter&lt;br /&gt;
clip = ProPainter(clip, img_mask_path=&amp;quot;J:/tmp/claude/wiki/assets/logo_mask.png&amp;quot;, length=100, sc_threshold=0.10)&lt;br /&gt;
# changing color matrix from &amp;#039;709&amp;#039; to &amp;#039;470bg&amp;#039; undoing color matrix change for vsProPainter&lt;br /&gt;
clip = core.resize.Bicubic(clip, matrix_in_s=&amp;quot;709&amp;quot;, matrix_s=&amp;quot;470bg&amp;quot;)&lt;br /&gt;
# changing range from full to limited range for vsProPainter&lt;br /&gt;
clip = core.resize.Bicubic(clip, format=vs.YUV420P10,range_in_s=&amp;quot;full&amp;quot;, range_s=&amp;quot;limited&amp;quot;)&lt;br /&gt;
# setting color range to TV (limited) range.&lt;br /&gt;
prop_name = &amp;#039;_Range&amp;#039; if core.core_version.release_major &amp;gt;= 74 else &amp;#039;_ColorRange&amp;#039;&lt;br /&gt;
clip = core.std.SetFrameProps(clip=clip, **{prop_name: vs.RANGE_LIMITED})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How Hybrid calls it ==&lt;br /&gt;
* The clip is requested as full range with the Rec.709 matrix; the plugin works in 8-bit RGB internally.&lt;br /&gt;
* A mask video is read with LWLibavSource as 8-bit RGB.&lt;br /&gt;
* Inpainting: length and scene change threshold are always written; the other options only when they differ from the defaults.&lt;br /&gt;
* Outpainting: length and dilation are always written; Hybrid continues with the new frame size.&lt;br /&gt;
* ProPainter also offers the [[Vapoursynth common filter options|common options]] (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== ProPainter ===&lt;br /&gt;
ProPainter (Zhou et al., ICCV 2023) combines image- and feature-level flow propagation with a sparse transformer for video inpainting. It uses RAFT for optical flow and a recurrent network for flow completion.&lt;br /&gt;
&lt;br /&gt;
=== vs-propainter ===&lt;br /&gt;
dan64&amp;#039;s vs-propainter brings ProPainter to VapourSynth, with inpainting from a mask image, mask clip or region and an outpainting function. Its README lists ways to save memory and time: a smaller mask region, a shorter length (memory only), fewer neighbor frames, a larger reference stride, FP16, and turning scene detection off.&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
* [https://github.com/dan64/vs-propainter vs-propainter]&lt;br /&gt;
* [https://github.com/sczhou/ProPainter ProPainter]&lt;br /&gt;
* Hybrid&amp;#039;s tooltips&lt;br /&gt;
&lt;br /&gt;
[[Category:Vapoursynth Filters]]&lt;/div&gt;</summary>
		<author><name>Selur</name></author>
	</entry>
</feed>