Skip to content

Commit e6c9c25

Browse files
shaoxiaowangwangshaoxiao
andauthored
fix examples/community/pipeline_stable_diffusion_xl_instantid.py (#6759)
Co-authored-by: wangshaoxiao <wangshaoxiao@xiaomi.com>
1 parent d643b66 commit e6c9c25

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/community/pipeline_stable_diffusion_xl_instantid.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,9 @@ def __call__(
812812
prompt_image_emb = self._encode_prompt_image_emb(
813813
image_embeds, device, self.unet.dtype, self.do_classifier_free_guidance
814814
)
815+
bs_embed, seq_len, _ = prompt_image_emb.shape
816+
prompt_image_emb = prompt_image_emb.repeat(1, num_images_per_prompt, 1)
817+
prompt_image_emb = prompt_image_emb.view(bs_embed * num_images_per_prompt, seq_len, -1)
815818

816819
# 4. Prepare image
817820
if isinstance(controlnet, ControlNetModel):

0 commit comments

Comments
 (0)