Instructions to use TencentARC/VideoPainter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use TencentARC/VideoPainter with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("TencentARC/VideoPainter", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files24 unmodified lines252627282930313233341 unmodified line363738394041424344452 unmodified lines484950515253545556575848 unmodified lines10710810911011111211311411511655 unmodified lines17217317417517617717817918018118233 unmodified lines21621721821922022115 unmodified lines23723823924024124224 unmodified lines<p align="center"><a href='https://yxbian23.github.io/project/video-painter'><img src='https://img.shields.io/badge/Project-Page-Green'></a> <a href="https://arxiv.org/abs/2503.05639"><img src="https://img.shields.io/badge/arXiv-2503.05639-b31b1b.svg"></a> <a href="https://youtu.be/HYzNfsD3A0s"><img src="https://img.shields.io/badge/YouTube-Video-red?logo=youtube"></a> <a href="https://github.com/TencentARC/VideoPainter"><img src="https://img.shields.io/badge/GitHub-Code-black?logo=github"></a> <a href='https://huggingface.co/datasets/TencentARC/VPData'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Dataset-blue'></a> <a href='https://huggingface.co/datasets/TencentARC/VPBench'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Benchmark-blue'></a> <a href="https://huggingface.co/TencentARC/VideoPainter"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Model-blue"></a></p>**Your like and star mean a lot for us to develop this project!** β€οΈ**π Table of Contents**1 unmodified line- [VideoPainter](#videopainter)- [π₯ Update Log](#-update-log)- [TODO](#todo)- [π οΈ Method Overview](#οΈ-method-overview)- [π Getting Started](#-getting-started)- [ππΌ Running Scripts](#-running-scripts)- [π€πΌ Cite Us](#-cite-us)- [π Acknowledgement](#-acknowledgement)2 unmodified lines## π₯ Update Log- [2025/3/09] π’ π’ [VideoPainter](https://huggingface.co/TencentARC/VideoPainter) are released, an efficient, any-length video inpainting & editing framework with plug-and-play context control.- [2025/3/09] π’ π’ [VPData](https://huggingface.co/datasets/TencentARC/VPData) and [VPBench](https://huggingface.co/datasets/TencentARC/VPBench) are released, the largest video inpainting dataset with precise segmentation masks and dense video captions (>390K clips).## TODO- [x] Release trainig and inference code- [x] Release evluation code- [x] Release [VideoPainter checkpoints](https://huggingface.co/TencentARC/VideoPainter) (based on CogVideoX-5B)- [x] Release [VPData and VPBench](https://huggingface.co/collections/TencentARC/videopainter-67cc49c6146a48a2ba93d159) for large-scale training and evaluation.- [x] Release gradio demo48 unmodified lines</details><details><summary><b>Data Download β¬οΈ</b></summary>**VPBench and VPData**You can download the VPBench [here](https://huggingface.co/datasets/TencentARC/VPBench), and the VPData [here](https://huggingface.co/datasets/TencentARC/VPData) (as well as the Davis we re-processed), which are used for training and testing the BrushNet. By downloading the data, you are agreeing to the terms and conditions of the license. The data structure should be like:55 unmodified linesgit lfs installgit clone https://huggingface.co/datasets/TencentARC/VPDatamv VPBench datacd dataunzip video_inpainting.zip```Noted: *Due to the space limit, you need to run the following script to download the raw videos of the complete VPData. The format should be consistent with VPData/VPBench above (After download the VPData/VPBench, the script will automatically place the raw videos of VPData into the corresponding dataset directories that have been created by VPBench).*```cd data_utils33 unmodified linesmv ckpt/FLUX.1-Fill-dev ckpt/flux_inp```The ckpt structure should be like:15 unmodified lines|-- transformer|-- vae|-- ...```</details>24 unmodified lines2526272829303132333435363738394041421 unmodified line4445464748495051525354555657582 unmodified lines6162636465666768697071727348 unmodified lines12212312412512612712855 unmodified lines18418518618718818919019119219319419519619719819933 unmodified lines23323423523623723823924024124224324424515 unmodified lines26126226326426526626724 unmodified lines<p align="center"><a href='https://yxbian23.github.io/project/video-painter'><img src='https://img.shields.io/badge/Project-Page-Green'></a> <a href="https://arxiv.org/abs/2503.05639"><img src="https://img.shields.io/badge/arXiv-2503.05639-b31b1b.svg"></a> <a href="https://github.com/TencentARC/VideoPainter"><img src="https://img.shields.io/badge/GitHub-Code-black?logo=github"></a> <a href="https://youtu.be/HYzNfsD3A0s"><img src="https://img.shields.io/badge/YouTube-Video-red?logo=youtube"></a> <a href='https://huggingface.co/datasets/TencentARC/VPData'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Dataset-blue'></a> <a href='https://huggingface.co/datasets/TencentARC/VPBench'><img src='https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Benchmark-blue'></a> <a href="https://huggingface.co/TencentARC/VideoPainter"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Model-blue"></a></p>**Your star means a lot for us to develop this project!** βββ**VPData and VPBench have been fully uploaded (contain 390K mask sequences and video captions). Welcome to use our biggest video segmentation dataset VPData with video captions!** π₯π₯π₯**π Table of Contents**1 unmodified line- [VideoPainter](#videopainter)- [π₯ Update Log](#-update-log)- [π TODO](#todo)- [π οΈ Method Overview](#οΈ-method-overview)- [π Getting Started](#-getting-started)- [Environment Requirement π](#environment-requirement-)- [Data Download β¬οΈ](#data-download-οΈ)- [ππΌ Running Scripts](#-running-scripts)- [Training π€―](#training-)- [Inference π](#inference-)- [Evaluation π](#evaluation-)- [π€πΌ Cite Us](#-cite-us)- [π Acknowledgement](#-acknowledgement)2 unmodified lines## π₯ Update Log- [2025/3/09] π’ π’ [VideoPainter](https://huggingface.co/TencentARC/VideoPainter) are released, an efficient, any-length video inpainting & editing framework with plug-and-play context control.- [2025/3/09] π’ π’ [VPData](https://huggingface.co/datasets/TencentARC/VPData) and [VPBench](https://huggingface.co/datasets/TencentARC/VPBench) are released, the largest video inpainting dataset with precise segmentation masks and dense video captions (>390K clips).- [2025/3/25] π’ π’ The 390K+ high-quality video segmentation masks of [VPData](https://huggingface.co/datasets/TencentARC/VPData) have been fully released.- [2025/3/25] π’ π’ The raw videos of videovo subset have been uploaded to [VPData](https://huggingface.co/datasets/TencentARC/VPData), to solve the raw video link expiration issue.## TODO- [x] Release trainig and inference code- [x] Release evaluation code- [x] Release [VideoPainter checkpoints](https://huggingface.co/TencentARC/VideoPainter) (based on CogVideoX-5B)- [x] Release [VPData and VPBench](https://huggingface.co/collections/TencentARC/videopainter-67cc49c6146a48a2ba93d159) for large-scale training and evaluation.- [x] Release gradio demo48 unmodified lines</details><details><summary><b>VPBench and VPData Download β¬οΈ</b></summary>You can download the VPBench [here](https://huggingface.co/datasets/TencentARC/VPBench), and the VPData [here](https://huggingface.co/datasets/TencentARC/VPData) (as well as the Davis we re-processed), which are used for training and testing the BrushNet. By downloading the data, you are agreeing to the terms and conditions of the license. The data structure should be like:55 unmodified linesgit lfs installgit clone https://huggingface.co/datasets/TencentARC/VPDatamv VPBench data# 1. unzip the masks in VPDatapython data_utils/unzip_folder.py --source_dir ./data/videovo_masks --target_dir ./data/video_inpainting/videovopython data_utils/unzip_folder.py --source_dir ./data/pexels_masks --target_dir ./data/video_inpainting/pexels# 2. unzip the raw videos in Videovo subset in VPDatapython data_utils/unzip_folder.py --source_dir ./data/videovo_raw_videos --target_dir ./data/videovo/raw_video```Noted: *Due to the space limit, you need to run the following script to download the raw videos of the Pexels subset in VPData. The format should be consistent with VPData/VPBench above (After download the VPData/VPBench, the script will automatically place the raw videos of VPData into the corresponding dataset directories that have been created by VPBench).*```cd data_utils33 unmodified linesmv ckpt/FLUX.1-Fill-dev ckpt/flux_inp```[Optional]You need to download [SAM2](https://huggingface.co/facebook/sam2-hiera-large) for video segmentation in gradio demo:```git lfs installcd ckptwget https://huggingface.co/facebook/sam2-hiera-large/resolve/main/sam2_hiera_large.pt```You can also choose the segmentation checkpoints of other sizes to balance efficiency and performance, such as [SAM2-Tiny](https://huggingface.co/facebook/sam2-hiera-tiny).The ckpt structure should be like:15 unmodified lines|-- transformer|-- vae|-- ...|-- sam2_hiera_large.pt```</details>
README.md+36-11