Skip to content

Commit 5a30c75

Browse files
committed
1 parent 1498884 commit 5a30c75

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

src/diffusers/pipelines/controlnet/pipeline_controlnet_union_inpaint_sd_xl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,9 @@ def denoising_value_valid(dnv):
15771577

15781578
original_size = original_size or (height, width)
15791579
target_size = target_size or (height, width)
1580+
for _image in control_image:
1581+
if isinstance(_image, torch.Tensor):
1582+
original_size = original_size or _image.shape[-2:]
15801583

15811584
# 10. Prepare added time ids & embeddings
15821585
add_text_embeds = pooled_prompt_embeds

src/diffusers/pipelines/controlnet/pipeline_controlnet_union_sd_xl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,11 @@ def __call__(
12901290
)
12911291

12921292
# 7.2 Prepare added time ids & embeddings
1293+
original_size = original_size or (height, width)
12931294
target_size = target_size or (height, width)
1295+
for _image in control_image:
1296+
if isinstance(_image, torch.Tensor):
1297+
original_size = original_size or _image.shape[-2:]
12941298
add_text_embeds = pooled_prompt_embeds
12951299
if self.text_encoder_2 is None:
12961300
text_encoder_projection_dim = int(pooled_prompt_embeds.shape[-1])

src/diffusers/pipelines/controlnet/pipeline_controlnet_union_sd_xl_img2img.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,11 @@ def __call__(
14301430
)
14311431

14321432
# 7.2 Prepare added time ids & embeddings
1433+
original_size = original_size or (height, width)
14331434
target_size = target_size or (height, width)
1435+
for _image in control_image:
1436+
if isinstance(_image, torch.Tensor):
1437+
original_size = original_size or _image.shape[-2:]
14341438

14351439
if negative_original_size is None:
14361440
negative_original_size = original_size

0 commit comments

Comments
 (0)