1inkusFace commited on
Commit
2213cfd
·
verified ·
1 Parent(s): 3c78b83

Update pipeline_stable_diffusion_3_ipa.py

Browse files
Files changed (1) hide show
  1. pipeline_stable_diffusion_3_ipa.py +3 -1
pipeline_stable_diffusion_3_ipa.py CHANGED
@@ -1175,7 +1175,9 @@ class StableDiffusion3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingle
1175
  image_prompt_embeds_list.append(image_prompt_embeds_5)
1176
 
1177
  # Concatenate the image embeddings
1178
- clip_image_embeds = torch.mean(torch.stack(image_prompt_embeds_list), dim=0)
 
 
1179
 
1180
  # 4. Prepare timesteps
1181
  timesteps, num_inference_steps = retrieve_timesteps(self.scheduler, num_inference_steps, device, timesteps)
 
1175
  image_prompt_embeds_list.append(image_prompt_embeds_5)
1176
 
1177
  # Concatenate the image embeddings
1178
+ ## clip_image_embeds = torch.mean(torch.stack(image_prompt_embeds_list), dim=0)
1179
+ clip_image_embeds = torch.cat(image_prompt_embeds_list, dim=0).mean(dim=0).unsqueeze(0)
1180
+ clip_image_embeds = clip_image_embeds.view(bs_embed, seq_len, -1) # Simplified reshape
1181
 
1182
  # 4. Prepare timesteps
1183
  timesteps, num_inference_steps = retrieve_timesteps(self.scheduler, num_inference_steps, device, timesteps)