Skip to content

Commit

Permalink
Disable ControlNet if model is SDXL (#1835)
Browse files Browse the repository at this point in the history
  • Loading branch information
catboxanon authored Jul 28, 2023
1 parent efda6dd commit 424022c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/controlnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,11 @@ def process(self, p, *args):
if len(self.enabled_units) == 0:
self.latest_network = None
return

is_sdxl = getattr(p.sd_model, 'is_sdxl', False)
if is_sdxl:
logger.warning('ControlNet does not support SDXL -- disabling')
return

detected_maps = []
forward_params = []
Expand Down

1 comment on commit 424022c

@MoYuan00
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that ’controlnet‘ started to support ‘sdxl‘ two weeks ago. https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines/controlnet。

Please sign in to comment.