Update pipeline_stable_diffusion_3_ipa.py
Browse files
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 |
-
|
|
|
|
|
|
|
| 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)
|