Update pipeline_stable_diffusion_3_ipa.py
Browse files
pipeline_stable_diffusion_3_ipa.py
CHANGED
@@ -1206,8 +1206,8 @@ class StableDiffusion3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingle
|
|
1206 |
# FAILS TIMESTEPS clip_image_embeds = torch.cat(image_prompt_embeds_list, dim=0).mean(dim=0)
|
1207 |
|
1208 |
# 1. Stack the image embeddings
|
1209 |
-
|
1210 |
-
|
1211 |
print('shape 1: ', stacked_image_embeds.shape)
|
1212 |
print('shape 1a: ', stacked_image_embedsg.shape)
|
1213 |
# 2. Calculate the mean of the stacked embeddings
|
|
|
1206 |
# FAILS TIMESTEPS clip_image_embeds = torch.cat(image_prompt_embeds_list, dim=0).mean(dim=0)
|
1207 |
|
1208 |
# 1. Stack the image embeddings
|
1209 |
+
stacked_image_embedsg = torch.stack(image_prompt_embeds_list)
|
1210 |
+
stacked_image_embeds = torch.cat(image_prompt_embeds_list, dim=1)
|
1211 |
print('shape 1: ', stacked_image_embeds.shape)
|
1212 |
print('shape 1a: ', stacked_image_embedsg.shape)
|
1213 |
# 2. Calculate the mean of the stacked embeddings
|