Skip to content

Commit

Permalink
[Fix] fix bug of controlnet in powerpaint (#2102)
Browse files Browse the repository at this point in the history
* Update gradio_PowerPaint.py

* Update README.md

* Update gradio_PowerPaint.py

* Update README.md

* Update README.md

* Update gradio_PowerPaint.py
  • Loading branch information
zhuang2002 authored Dec 22, 2023
1 parent 57cc5ca commit 1bdd952
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/powerpaint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ This README provides a step-by-step guide to download the repository, set up the

- 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.

**December 22, 2023**

- 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.

## Next

**Stronger Model Weights Coming Soon!**
Expand Down
1 change: 1 addition & 0 deletions projects/powerpaint/gradio_PowerPaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def predict_controlnet(input_image, input_control_image, control_type, prompt,
pipe.tokenizer, pipe.unet, base_control,
pipe.scheduler, None, None, False)
control_pipe = control_pipe.to('cuda')
current_control = 'canny'
if current_control != control_type:
if control_type == 'canny' or control_type is None:
control_pipe.controlnet = ControlNetModel.from_pretrained(
Expand Down

0 comments on commit 1bdd952

Please sign in to comment.