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 | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | ![original_image](https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png) | ![mask_image](https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png) | **Object Removal Task** ![object-removal](./object-removal_result.png) **Shape Guided Task** ![shape-guided](./shape-guided_result.png) **Context aware Task** ![context-aware](./context-aware_result.png) **Inpaint Task** ![inpaint](./inpaint_result.png) **Outpaint Task** ![outpaint](./image-outpainting_result.png)