ProPainter Inpainting
Erase things from video without a mask editor pretending to be smart
- image
- mask
- IMAGE
- FLOW_MASK
- MASK_DILATE
If you've got a video with a boom mic, a tourist, a watermark, or your own hand in frame and you want it gone - not "regenerated into something plausible," actually gone, with the background behind it reconstructed from footage you already shot - ProPainter Inpainting is the tool for that specific job. It's the ComfyUI wrapper (built by daniabib, an unofficial community port) around ProPainter, a 2023 research framework that does video object removal and video completion by tracking motion, not by imagining content.
That distinction matters more than it sounds. Every newer video-inpainting option you'll hear about - Wan VACE, LanPaint bolted onto Qwen or SAM segmentation, Bernini's instruction-driven removal - is a diffusion model generating new pixels from a prompt or a learned prior. ProPainter isn't. It computes optical flow across your clip, propagates the real, known pixels from frames where the object isn't in the way into the frames where it is, and only falls back on a transformer to fill in whatever the flow genuinely couldn't recover. No prompt, no hallucination risk, no VRAM budget for a full video diffusion model. The tradeoff is that it's a 2023-era algorithmic approach going up against 2026 generative ones - it's not going to composite a shadow-consistent replacement in a scene with wild camera motion the way VACE increasingly can. But for "there's an object, make it not be there," it's fast, deterministic, and doesn't need you to describe anything.
How it works
Under the hood: RAFT estimates optical flow between frames (that's the raft_iter input - more iterations, more accurate flow, slower). ProPainter uses that flow to propagate pixels bidirectionally through the clip, filling masked regions with real content borrowed from other frames whenever the flow says it's visible somewhere. What's left after propagation - usually small, hard-to-track gaps - gets handed to a spatiotemporal transformer for completion. To keep memory sane on long clips, the whole thing runs in chunks (subvideo_length), sampling a handful of reference frames for global context (ref_stride) plus a local window around each chunk (neighbor_length).
Inputs and outputs that matter
The two you actually build the node around:
image- your video frames.mask- must be the same size as the frames. This node doesn't generate it for you; you need a separate segmentation step. The pack's own README points at VideoHelperSuite for loading/saving frames and YoloWorld-EfficientSAM for prompt-driven masking; in 2026 SAM2/SAM3-based masking nodes work too.
Everything else has a sane default and is worth leaving alone until you're troubleshooting: width/height (640×360 default - this is your resize target, and it directly trades quality against VRAM), mask_dilates (5, grows your mask so a sloppy edge doesn't leave a ghost outline), flow_mask_dilates (8, a separate and larger dilation just for flow estimation, since flow errors near an edge hurt more than pixel errors), and fp16 (enabled by default here - flip it off only if you're chasing a precision issue, not a memory one).
Outputs: IMAGE is the result - wire it straight into a video-combine/save node. FLOW_MASK and MASK_DILATE are the mask ProPainter actually computed and dilated internally; they're not required downstream, but piping them into a preview node is the fastest way to debug why an edge is smearing.
Installing it
Easiest path: ComfyUI Manager, search "ComfyUI ProPainter Nodes" by daniabib. Manual route: cd ComfyUI/custom_nodes && git clone https://github.com/daniabib/ComfyUI_ProPainter_Nodes, then pip install -r requirements.txt inside that folder, then restart. The RAFT and ProPainter model weights download automatically to a weights folder on first run - no manual model wrangling, just expect the first execution to pause while it fetches them.
One more thing worth knowing before you build a paid pipeline on this: ProPainter's own models and code ship under the NTU S-Lab License 1.0, which is non-commercial. A commenter flagged this the day the node pack launched, and it's still true - check it before you use this for client work.
Common issues
"Where do I even get a mask?" is the most common confusion in the wild, and it's not you missing something - the node genuinely doesn't include a masking tool. Pair it with VideoHelperSuite plus a segmentation node.
Out of memory even at modest resolution. One user running SAM2 + ProPainter together hit VRAM crashes on an 8GB RTX 4060 even after downscaling to roughly 512×512. If you're VRAM-constrained: shrink width/height further, drop subvideo_length, and make sure fp16 is enabled.
Apple Silicon. PyTorch's MPS backend has historically had gaps in Conv3D support, and this pipeline leans on 3D convolutions. If you're on an M-series Mac, don't be surprised if it needs CPU fallback or doesn't run cleanly out of the box.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| width | INT | 6400–2560 | — |
| height | INT | 3600–2560 | — |
| mask_dilates | INT | 50–100 | — |
| flow_mask_dilates | INT | 80–100 | — |
| ref_stride | INT | 101–100 | — |
| neighbor_length | INT | 102–300 | — |
| subvideo_length | INT | 801–300 | — |
| raft_iter | INT | 201–100 | — |
| fp16 | COMBO | 2 options: enable, disable |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| FLOW_MASK | MASK | — |
| MASK_DILATE | MASK | — |