Init commit
Browse files
PowerPaint_Brushnet/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:530f2886ef5bcdf199269ec344155a517639ba64219b85eeb23fd86aab93147f
|
| 3 |
+
size 3544366408
|
PowerPaint_Brushnet/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:73709b4360ca06ef990a67d090e8d81a4310943d67a88845653fc4e9f7f26b65
|
| 3 |
+
size 492401329
|
README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
|
| 7 |
+
### [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)
|
| 8 |
+
|
| 9 |
+
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.
|
| 10 |
+
|
| 11 |
+
**Feel free to try it and give it a star!**:star:
|
| 12 |
+
|
| 13 |
+
## 🚀 News
|
| 14 |
+
|
| 15 |
+
**May 22, 2024**:fire:
|
| 16 |
+
|
| 17 |
+
- We open source the model weights for PowerPaint v2-1. [](https://huggingface.co/JunhaoZhuang/PowerPaint-v2-1)
|
| 18 |
+
|
| 19 |
+
**April 7, 2024**:fire:
|
| 20 |
+
|
| 21 |
+
- 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)
|
| 22 |
+
|
| 23 |
+
**April 6, 2024**:
|
| 24 |
+
|
| 25 |
+
- 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**.
|
| 26 |
+
- Tips: We preserve the cross-attention layer that was deleted by BrushNet for the task prompts input.
|
| 27 |
+
|
| 28 |
+
| | Object insertion | Object Removal|Shape-guided Object Insertion|Outpainting|
|
| 29 |
+
|-----------------|-----------------|-----------------|-----------------|-----------------|
|
| 30 |
+
| Original Image| ||||
|
| 31 |
+
| Output| | |||
|
| 32 |
+
|
| 33 |
+
**December 22, 2023**:wrench:
|
| 34 |
+
|
| 35 |
+
- 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.
|
| 36 |
+
|
| 37 |
+
**December 18, 2023**
|
| 38 |
+
|
| 39 |
+
*Enhanced PowerPaint Model*
|
| 40 |
+
|
| 41 |
+
- 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.
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
________________
|
| 46 |
+
<img src='https://github.com/open-mmlab/mmagic/assets/12782558/acd01391-c73f-4997-aafd-0869aebcc915'/>
|
| 47 |
+
|
| 48 |
+
## Getting Started
|
| 49 |
+
|
| 50 |
+
```bash
|
| 51 |
+
# Clone the Repository
|
| 52 |
+
git clone https://github.com/zhuang2002/PowerPaint.git
|
| 53 |
+
|
| 54 |
+
# Navigate to the Repository
|
| 55 |
+
cd projects/powerpaint
|
| 56 |
+
|
| 57 |
+
# Create Virtual Environment with Conda
|
| 58 |
+
conda create --name PowerPaint python=3.9
|
| 59 |
+
conda activate PowerPaint
|
| 60 |
+
|
| 61 |
+
# Install Dependencies
|
| 62 |
+
pip install -r requirements.txt
|
| 63 |
+
```
|
| 64 |
+
## PowerPaint v2
|
| 65 |
+
|
| 66 |
+
```bash
|
| 67 |
+
python gradio_PowerPaint_BrushNet.py
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
## PowerPaint v1
|
| 71 |
+
|
| 72 |
+
```bash
|
| 73 |
+
# Create Models Folder
|
| 74 |
+
mkdir models
|
| 75 |
+
|
| 76 |
+
# Set up Git LFS
|
| 77 |
+
git lfs install
|
| 78 |
+
|
| 79 |
+
# Clone PowerPaint Model
|
| 80 |
+
git lfs clone https://huggingface.co/JunhaoZhuang/PowerPaint-v1/ ./models
|
| 81 |
+
|
| 82 |
+
python gradio_PowerPaint.py
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
This command will launch the Gradio interface for PowerPaint.
|
| 86 |
+
|
| 87 |
+
Feel free to explore and edit images with PowerPaint!
|
| 88 |
+
|
| 89 |
+
## BibTeX
|
| 90 |
+
|
| 91 |
+
```
|
| 92 |
+
@misc{zhuang2023task,
|
| 93 |
+
title={A Task is Worth One Word: Learning with Task Prompts for High-Quality Versatile Image Inpainting},
|
| 94 |
+
author={Junhao Zhuang and Yanhong Zeng and Wenran Liu and Chun Yuan and Kai Chen},
|
| 95 |
+
year={2023},
|
| 96 |
+
eprint={2312.03594},
|
| 97 |
+
archivePrefix={arXiv},
|
| 98 |
+
primaryClass={cs.CV}
|
| 99 |
+
}
|
| 100 |
+
```
|