Unverified Commit e6c9c251 authored by shaoxiaowang's avatar shaoxiaowang Committed by GitHub
Browse files

fix examples/community/pipeline_stable_diffusion_xl_instantid.py (#6759)


Co-authored-by: default avatarwangshaoxiao <wangshaoxiao@xiaomi.com>
parent d643b669
......@@ -812,6 +812,9 @@ class StableDiffusionXLInstantIDPipeline(StableDiffusionXLControlNetPipeline):
prompt_image_emb = self._encode_prompt_image_emb(
image_embeds, device, self.unet.dtype, self.do_classifier_free_guidance
)
bs_embed, seq_len, _ = prompt_image_emb.shape
prompt_image_emb = prompt_image_emb.repeat(1, num_images_per_prompt, 1)
prompt_image_emb = prompt_image_emb.view(bs_embed * num_images_per_prompt, seq_len, -1)
# 4. Prepare image
if isinstance(controlnet, ControlNetModel):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment