|
Model from: https://huggingface.co/JunhaoZhuang/PowerPaint_v2 |
|
|
|
Tokens (P_ctxt, P_shape, P_obj) added by PowerPaint has been integrated into the text_encoder and tokenizer. |
|
|
|
Unlike PowerPaint_v1, PowerPaint_v2 uses a method similar to BrushNet, so it can be applied to any sd1.5 type basic model. |
|
|
|
Clone demo code and models: |
|
|
|
```bash |
|
git lfs install |
|
git clone https://huggingface.co/Sanster/PowerPaint_v2 |
|
``` |
|
|
|
Run `main.py`: |
|
|
|
```bash |
|
python3 main.py runwayml/stable-diffusion-v1-5 |
|
``` |
|
|
|
The demo code will generate following results: |
|
|
|
| Original Image | Mask | |
|
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | |
|
|  |  | |
|
|
|
**Object Removal Task** |
|
|
|
 |
|
|
|
**Shape Guided Task** |
|
|
|
 |
|
|
|
**Context aware Task** |
|
|
|
 |
|
|
|
**Inpaint Task** |
|
|
|
 |
|
|
|
**Outpaint Task** |
|
|
|
 |
|
|