Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
30a5acc3
Unverified
Commit
30a5acc3
authored
Sep 01, 2023
by
YiYi Xu
Committed by
GitHub
Sep 01, 2023
Browse files
fix a bug in sdxl-controlnet-img2img when using MultiControlNetModel (#4862)
fix Co-authored-by:
yiyixuxu
<
yixu310@gmail,com
>
parent
0c775544
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
...pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
+2
-1
No files found.
src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
View file @
30a5acc3
...
@@ -1177,6 +1177,7 @@ class StableDiffusionXLControlNetImg2ImgPipeline(DiffusionPipeline, TextualInver
...
@@ -1177,6 +1177,7 @@ class StableDiffusionXLControlNetImg2ImgPipeline(DiffusionPipeline, TextualInver
do_classifier_free_guidance
=
do_classifier_free_guidance
,
do_classifier_free_guidance
=
do_classifier_free_guidance
,
guess_mode
=
guess_mode
,
guess_mode
=
guess_mode
,
)
)
height
,
width
=
control_image
.
shape
[
-
2
:]
elif
isinstance
(
controlnet
,
MultiControlNetModel
):
elif
isinstance
(
controlnet
,
MultiControlNetModel
):
control_images
=
[]
control_images
=
[]
...
@@ -1196,9 +1197,9 @@ class StableDiffusionXLControlNetImg2ImgPipeline(DiffusionPipeline, TextualInver
...
@@ -1196,9 +1197,9 @@ class StableDiffusionXLControlNetImg2ImgPipeline(DiffusionPipeline, TextualInver
control_images
.
append
(
control_image_
)
control_images
.
append
(
control_image_
)
control_image
=
control_images
control_image
=
control_images
height
,
width
=
control_image
[
0
].
shape
[
-
2
:]
else
:
else
:
assert
False
assert
False
height
,
width
=
control_image
.
shape
[
-
2
:]
# 5. Prepare timesteps
# 5. Prepare timesteps
self
.
scheduler
.
set_timesteps
(
num_inference_steps
,
device
=
device
)
self
.
scheduler
.
set_timesteps
(
num_inference_steps
,
device
=
device
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment