Update pipeline_stable_diffusion_3_ipa.py
Browse files
pipeline_stable_diffusion_3_ipa.py
CHANGED
|
@@ -1201,9 +1201,9 @@ class StableDiffusion3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingle
|
|
| 1201 |
print('catted embeds list with mean: ',clip_image_embeds_cat_list.shape)
|
| 1202 |
#seq_len, _ = clip_image_embeds_cat_list.shape
|
| 1203 |
#clip_image_embeds_cat_list_repeat = clip_image_embeds_cat_list.repeat(1, 1, 1)
|
| 1204 |
-
clip_image_embeds_view =
|
| 1205 |
-
print('catted embeds repeat: ',
|
| 1206 |
-
clip_image_embeds_view =
|
| 1207 |
print('catted viewed: ',clip_image_embeds_view.shape)
|
| 1208 |
#zeros_tensor = torch.zeros_like(clip_image_embeds_view)
|
| 1209 |
zeros_tensor = torch.zeros_like(clip_image_embeds_view[:, :image_prompt_embeds_list[0].shape[1], :]) # Make zeros tensor match the sequence length of a single image embedding
|
|
|
|
| 1201 |
print('catted embeds list with mean: ',clip_image_embeds_cat_list.shape)
|
| 1202 |
#seq_len, _ = clip_image_embeds_cat_list.shape
|
| 1203 |
#clip_image_embeds_cat_list_repeat = clip_image_embeds_cat_list.repeat(1, 1, 1)
|
| 1204 |
+
clip_image_embeds_view = clip_image_embeds_cat_list.unsqueeze(0) # Added unsqueeze here instead
|
| 1205 |
+
#print('catted embeds repeat: ',clip_image_embeds_view.shape)
|
| 1206 |
+
#clip_image_embeds_view = clip_image_embeds_view.view(1, seq_len, -1)
|
| 1207 |
print('catted viewed: ',clip_image_embeds_view.shape)
|
| 1208 |
#zeros_tensor = torch.zeros_like(clip_image_embeds_view)
|
| 1209 |
zeros_tensor = torch.zeros_like(clip_image_embeds_view[:, :image_prompt_embeds_list[0].shape[1], :]) # Make zeros tensor match the sequence length of a single image embedding
|