A Task is Worth One Word: Learning with Task Prompts for High-Quality Versatile Image Inpainting

Junhao Zhuang, Yanhong Zeng, Wenran Liu, Chun Yuan, Kai Chen
12/6/2023
243 citations
cs.CV

Official code: open-mmlab/mmagic (7,479 stars, Jupyter Notebook, Apache-2.0, PyTorch, last commit 2024-08-06).

Abstract

Advancing image inpainting is challenging as it requires filling user-specified regions for various intents, such as background filling and object synthesis. Existing approaches focus on either context-aware filling or object synthesis using text descriptions.

Show full abstract

However, achieving both tasks simultaneously is challenging due to differing training strategies. To overcome this challenge, we introduce PowerPaint, the first high-quality and versatile inpainting model that excels in multiple inpainting tasks. First, we introduce learnable task prompts along with tailored fine-tuning strategies to guide the model's focus on different inpainting targets explicitly. This enables PowerPaint to accomplish various inpainting tasks by utilizing different task prompts, resulting in state-of-the-art performance. Second, we demonstrate the versatility of the task prompt in PowerPaint by showcasing its effectiveness as a negative prompt for object removal. Moreover, we leverage prompt interpolation techniques to enable controllable shape-guided object inpainting, enhancing the model's applicability in shape-guided applications. Finally, we conduct extensive experiments and applications to verify the effectiveness of PowerPaint. We release our codes and models on our project page: https://powerpaint.github.io/.

View on arXivView PDF

Code Implementations(1)

open-mmlab/mmagicOfficial100%
PyTorchApache-2.0

OpenMMLab Multimodal Advanced, Generative, and Intelligent Creation Toolbox. Unlock the magic 🪄: Generative-AI (AIGC), easy-to-use APIs, awsome model zoo, diffusion models, for text-to-image generation, image/video restoration/enhancement, etc.

7,4791,096Jupyter Notebook, PythonAug 23, 20192 years agoApache-2.0
aigccomputer-visiondeep-learningdiffusiondiffusion-models+14 more

Similar Papers

Cite this paper

@article{zhuang2023task,
  title  = {A Task is Worth One Word: Learning with Task Prompts for High-Quality Versatile Image Inpainting},
  author = {Junhao Zhuang and Yanhong Zeng and Wenran Liu and Chun Yuan and Kai Chen},
  year   = {2023},
  eprint = {2312.03594},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.03594v4},
  journal = {ECCV 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.03594.svg)](https://codeofpaper.com/paper/2312.03594)

Discussion