Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,95 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
# A Task is Worth One Word: Learning with Task Prompts for High-Quality Versatile Image Inpainting
|
5 |
+
|
6 |
+
### [Project Page](https://powerpaint.github.io/) | [Paper](https://arxiv.org/abs/2312.03594) | [Online Demo(OpenXlab)](https://openxlab.org.cn/apps/detail/rangoliu/PowerPaint#basic-information)
|
7 |
+
|
8 |
+
This README provides a step-by-step guide to download the repository, set up the required virtual environment named "PowerPaint" using conda, and run PowerPaint with or without ControlNet.
|
9 |
+
|
10 |
+
**Feel free to try it and give it a star!**:star:
|
11 |
+
|
12 |
+
## 🚀 News
|
13 |
+
|
14 |
+
**April 7, 2024**:fire:
|
15 |
+
|
16 |
+
- We open source the model weights and code for PowerPaint v2.[](https://openxlab.org.cn/models/detail/zhuangjunhao/PowerPaint_v2)[](https://huggingface.co/JunhaoZhuang/PowerPaint_v2)
|
17 |
+
|
18 |
+
**April 6, 2024**:fire:
|
19 |
+
|
20 |
+
- We have retrained a new PowerPaint, taking inspiration from Brushnet. The [Online Demo](https://openxlab.org.cn/apps/detail/rangoliu/PowerPaint) has been updated accordingly. **We plan to release the model weights and code as open source in the next few days**.
|
21 |
+
- Tips: We preserve the cross-attention layer that was deleted by BrushNet for the task prompts input.
|
22 |
+
|
23 |
+
| | Object insertion | Object Removal|Shape-guided Object Insertion|Outpainting|
|
24 |
+
|-----------------|-----------------|-----------------|-----------------|-----------------|
|
25 |
+
| Original Image| ||||
|
26 |
+
| Output| | |||
|
27 |
+
|
28 |
+
**December 22, 2023**:wrench:
|
29 |
+
|
30 |
+
- The logical error in loading ControlNet has been rectified. The `gradio_PowerPaint.py` file and [Online Demo](https://openxlab.org.cn/apps/detail/rangoliu/PowerPaint) have also been updated.
|
31 |
+
|
32 |
+
**December 18, 2023**
|
33 |
+
|
34 |
+
*Enhanced PowerPaint Model*
|
35 |
+
|
36 |
+
- We are delighted to announce the release of more stable model weights. These refined weights can now be accessed on [Hugging Face](https://huggingface.co/JunhaoZhuang/PowerPaint-v1/tree/main). The `gradio_PowerPaint.py` file and [Online Demo](https://openxlab.org.cn/apps/detail/rangoliu/PowerPaint) have also been updated as part of this release.
|
37 |
+
|
38 |
+
|
39 |
+
|
40 |
+
________________
|
41 |
+
<img src='https://github.com/open-mmlab/mmagic/assets/12782558/acd01391-c73f-4997-aafd-0869aebcc915'/>
|
42 |
+
|
43 |
+
## Getting Started
|
44 |
+
|
45 |
+
```bash
|
46 |
+
# Clone the Repository
|
47 |
+
git clone https://github.com/zhuang2002/PowerPaint.git
|
48 |
+
|
49 |
+
# Navigate to the Repository
|
50 |
+
cd projects/powerpaint
|
51 |
+
|
52 |
+
# Create Virtual Environment with Conda
|
53 |
+
conda create --name PowerPaint python=3.9
|
54 |
+
conda activate PowerPaint
|
55 |
+
|
56 |
+
# Install Dependencies
|
57 |
+
pip install -r requirements.txt
|
58 |
+
```
|
59 |
+
## PowerPaint v2
|
60 |
+
|
61 |
+
```bash
|
62 |
+
python gradio_PowerPaint_BrushNet.py
|
63 |
+
```
|
64 |
+
|
65 |
+
## PowerPaint v1
|
66 |
+
|
67 |
+
```bash
|
68 |
+
# Create Models Folder
|
69 |
+
mkdir models
|
70 |
+
|
71 |
+
# Set up Git LFS
|
72 |
+
git lfs install
|
73 |
+
|
74 |
+
# Clone PowerPaint Model
|
75 |
+
git lfs clone https://huggingface.co/JunhaoZhuang/PowerPaint-v1/ ./models
|
76 |
+
|
77 |
+
python gradio_PowerPaint.py
|
78 |
+
```
|
79 |
+
|
80 |
+
This command will launch the Gradio interface for PowerPaint.
|
81 |
+
|
82 |
+
Feel free to explore and edit images with PowerPaint!
|
83 |
+
|
84 |
+
## BibTeX
|
85 |
+
|
86 |
+
```
|
87 |
+
@misc{zhuang2023task,
|
88 |
+
title={A Task is Worth One Word: Learning with Task Prompts for High-Quality Versatile Image Inpainting},
|
89 |
+
author={Junhao Zhuang and Yanhong Zeng and Wenran Liu and Chun Yuan and Kai Chen},
|
90 |
+
year={2023},
|
91 |
+
eprint={2312.03594},
|
92 |
+
archivePrefix={arXiv},
|
93 |
+
primaryClass={cs.CV}
|
94 |
+
}
|
95 |
+
```
|