← Back to Leaderboard
Psczhou

sczhou/ProPainter

Optical flow and a Transformer for mask-guided video inpainting

Open-Source AI AppQuickstart ↓
Engineering Health (Methodology)
B · 63/100
Maintenance Activity
● Updated 1mo ago
Latest Release
v0.1.0
Commercial License Check
Custom / Check Repo

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance26/35
Fork Adoption20/25
Release Cadence11/20
License Clarity6/20
Local AIGPUCLI
Total Stars
★ 7,120
24h Growth
+4
7d Growth
+15
Forks
830

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

sczhou/ProPainter Star History (2023-09-01 - 2026-12-04) ALL-TIME STAR HISTORY (2023-09 – 2026-12) +7.1k in 1190d · avg +6/day 7.5k 3.8k 0 2023-09-01: ★ 12023-11-18: ★ 3,6442024-02-03: ★ 4,0522024-04-20: ★ 4,4082024-07-06: ★ 4,7242024-09-21: ★ 5,2612024-12-07: ★ 5,5402025-02-22: ★ 5,7342025-05-10: ★ 5,9092025-07-26: ★ 6,0282025-10-11: ★ 6,1772025-12-27: ★ 6,3152026-03-14: ★ 6,4862026-05-30: ★ 6,6622026-08-15: ★ 6,8482026-12-04: ★ 7,120 ★ 7.1k 2023-09 2025-04 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

ProPainter is a mask-driven video inpainting pipeline, not a per-frame image filter. RAFT estimates optical flow, a recurrent network completes the missing motion field in masked regions, and ProPainter uses propagation and a Transformer to reconstruct the missing content. The distinction matters: propagation reuses evidence visible in other frames, while reconstruction fills what that evidence cannot recover.

inference_propainter.py is the main Python entry point. The repository separates RAFT code in RAFT/, model code in model/, training configuration in configs/, and browser demos in web-demos/. The pretrained path uses separate RAFT, flow-completion, and ProPainter checkpoints. PyTorch and Torchvision underpin the model stack; PyAV, OpenCV, and imageio-ffmpeg are dependencies on the media side. Integration is centered on the CLI and its file inputs, with a separate interactive demo for object selection.

Key Capabilities & Differentiators

The CLI takes an MP4 or extracted frames plus a mask and writes results to results/. The shipped examples cover removing a moving object using a directory of frame-wise masks and completing a masked video using a single PNG. For research use, the repository includes separate training configs and evaluation scripts for flow completion and the full model, dataset preparation for YouTube-VOS and DAVIS, and an optional optical-flow precomputation script.

GPU memory can be tuned through processing resolution, precision, temporal context, and sub-video length. Estimated VRAM at 720×480 for an 80-frame segment is 13 GB in FP32 or 8 GB in FP16. At 1280×720, the 50-frame estimates are 28 GB and 19 GB respectively; at 80 frames, FP32 runs out of memory in the reported setup and FP16 is estimated at 25 GB. These are sizing estimates for the listed configurations, not hardware guarantees.

Trade-offs & Limitations

Compared with frame-by-frame image inpainting, ProPainter explicitly uses motion across frames, a better fit when a moving subject leaves a region that must look coherent throughout the clip. The extra flow and temporal processing raises GPU memory cost, and the CLI expects you to supply masks. The interactive demo helps with selection; community projects such as ProPainter WebUI and the ComfyUI nodes offer different workflow entry points, not a verified quality or speed advantage.

To fit a tighter VRAM budget, shorten the default 80-frame --subvideo_length, enable --fp16, or process at a lower resolution. Reducing the default --neighbor_length of 10 or increasing the default --ref_stride of 10 saves memory by giving the model fewer neighboring frames or more sparsely sampled references. Lower resolution can sacrifice detail, and less temporal context can leave fewer useful views for reconstructing occluded regions, so check results on representative footage. The code and models use NTU S-Lab License 1.0 for non-commercial use; running locally does not remove that restriction.

Hardware & Deployment Guide

The reference setup uses a Python 3.8 Conda environment and pip install -r requirements.txt, with CUDA 9.2+, PyTorch 1.7.1+, and Torchvision 0.8.2+. Treat those as minimums, not a compatibility matrix: choose a PyTorch and Torchvision pair that works with your CUDA runtime and GPU driver, then validate it with one of the bundled examples. Release v0.1.0 (September 3, 2023) primarily distributes pretrained weights rather than a packaged runtime.

For local inference, stage ProPainter.pth, recurrent_flow_completion.pth, and raft-things.pth in weights/, or let inference fetch them on the first run. Pre-staging avoids that first-run network dependency; i3d_rgb_imagenet.pt is for VFID evaluation, not ordinary inference. Run the CLI against your video and masks, or use the local interactive demo under web-demos/hugging_face if you need an object-selection interface. A hosted Hugging Face demo is also available for trial use.

Motion pipeline: RAFT flow estimation and recurrent flow completion precede propagation and Transformer reconstruction.
Input contract: The CLI accepts MP4 or extracted frames; the examples cover a single PNG mask and a directory of frame-wise masks.
Memory sizing: At 640×480 and 80 frames per segment, estimated VRAM is 12 GB in FP32 and 7 GB in FP16.
Temporal controls: --neighbor_length and --ref_stride control local context and global reference spacing; --subvideo_length sets the processing segment length.
Reproducibility: Separate flow-completion and ProPainter training configs and evaluation scripts support work with YouTube-VOS and DAVIS.
Local operation: v0.1.0 distributes pretrained weights for the CLI; the browser demo can also run locally, subject to non-commercial terms.
Best For

Non-commercial video restoration or object removal with masks, a local CUDA GPU, and a need for fills that stay coherent across frames.

Skip If

You need commercial rights without separate permission, an automatic mask-free CLI, or native-resolution HD processing on a low-VRAM GPU.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Local AIGPUCLI
git clone https://github.com/sczhou/ProPainter.git

Comparison vs. Top Voice, Vision & Video Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
ProPainter ★7.1k+15Python—Optical flow and a Transformer for mask-guided video inpainting
ComfyUI149.9k+945PythonGPL-3.0A node-graph engine for building and running multimodal AI workflows locally
MoneyPrinterTurbo147.5k+1.7kPythonMITA self-hosted Python pipeline that turns topics into short videos
OpenMontage85.5k+1.6kPythonAGPL-3.0Agent-led video production from brief to finished edit

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/sczhou/ProPainter.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

sczhou/ProPainter Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about ProPainter

How do I integrate ProPainter into an existing editing pipeline?

Pass an MP4 or a directory of extracted frames to inference_propainter.py with --video, and supply the region to reconstruct with --mask. The examples cover both a directory of frame-wise masks and a single PNG mask. If you only know which object to remove and do not have masks yet, the interactive demo provides an object-selection workflow; do not assume the CLI detects or tracks the object for you.

How much GPU memory do I need, and what should I tune first?

Start with your target resolution and sub-video length. At 720×480 and 80 frames per segment, the estimates are 13 GB in FP32 and 8 GB in FP16; at 320×240 and 50 frames, they fall to 3 GB and 2 GB. Leave VRAM headroom and test on representative clips. If needed, enable --fp16, reduce --subvideo_length, or lower the processing resolution before reducing temporal context with --neighbor_length or --ref_stride.

Can I self-host it, and does that permit commercial use?

Yes, you can run inference locally and pre-stage the model files in weights/ rather than rely on the first-run download. Self-hosting does not change the license: the code and models are governed by NTU S-Lab License 1.0 for non-commercial use. Obtain separate permission before adopting ProPainter for commercial work.

When should I choose ProPainter over frame-by-frame inpainting or a community integration?

Use ProPainter when the fill must follow motion across frames and you can supply masks. A frame-by-frame image inpainter is simpler to wire into an image pipeline but does not explicitly coordinate fills over time. Faster ProPainter and the ComfyUI nodes are community options worth testing if execution speed or workflow integration is the priority; there is no verified head-to-head benchmark here to rank them.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining sczhou/ProPainter? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature sczhou/ProPainter on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare