Update pipeline_stable_diffusion_3_ipa.py
Browse files
pipeline_stable_diffusion_3_ipa.py
CHANGED
|
@@ -1183,7 +1183,9 @@ class StableDiffusion3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingle
|
|
| 1183 |
#clip_image_embeds = clip_image_embeds.view(bs_embed, seq_len) # Simplified reshape
|
| 1184 |
|
| 1185 |
# experimental way
|
| 1186 |
-
clip_image_embeds = torch.cat([torch.zeros_like(torch.stack(image_prompt_embeds_list)), torch.stack(image_prompt_embeds_list)], dim=0).mean(dim=0)
|
|
|
|
|
|
|
| 1187 |
|
| 1188 |
|
| 1189 |
# 4. Prepare timesteps
|
|
|
|
| 1183 |
#clip_image_embeds = clip_image_embeds.view(bs_embed, seq_len) # Simplified reshape
|
| 1184 |
|
| 1185 |
# experimental way
|
| 1186 |
+
#clip_image_embeds = torch.cat([torch.zeros_like(torch.stack(image_prompt_embeds_list)), torch.stack(image_prompt_embeds_list)], dim=0).mean(dim=0)
|
| 1187 |
+
#clip_image_embeds = torch.cat(torch.stack(image_prompt_embeds_list), dim=0).mean(dim=0)
|
| 1188 |
+
clip_image_embeds = torch.mean(torch.stack(image_prompt_embeds_list), dim=0)
|
| 1189 |
|
| 1190 |
|
| 1191 |
# 4. Prepare timesteps
|