transformers icon indicating copy to clipboard operation
transformers copied to clipboard

Add propainter

Open RUFFY-369 opened this issue 5 months ago • 34 comments

What does this PR do?

This PR adds ProPainter, a Video Inpainting model with 5.4k stars and 635 forks repo. It fixes #26360 and resolve stale PR #26391 for the above issue from complete scratch to build on with transformers standard.

Before submitting

  • [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [x] Did you read the contributor guideline, Pull Request section?
  • [x] Was this discussed/approved via a Github issue or the forum? Please add a link to it if that's the case.
  • [x] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • [x] Did you write any new necessary tests?

Who can review?

@amyeroberts @ArthurZucker @NielsRogge (?) @rafaelpadilla(as he was the initial reviewer on the stale PR)

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR.

The PR is more than ready for first pass of review!!!

TODO(will be done in a fly :)):

  • [x] Fix all common test failures
  • [x] Update weights conversion scripts with the working one on local machine
  • [x] Review batching nits one more time in the applicable files
  • [x] Update docs in corresponding files
  • [x] Check for video 'outpainting' error

Results:

Here, I am attaching the GIFs for original video, original model's output for object removal through video inpainting and the current PR' HF model's output for object removal through video inpainting:

Original video: original

Original model output: original_removal

HF ported model output:

hf_removal

Example usage is provided in the doc file here

RUFFY-369 avatar Aug 30 '24 14:08 RUFFY-369