Update pipeline_stable_diffusion_3_ipa.py
Browse files
pipeline_stable_diffusion_3_ipa.py
CHANGED
@@ -1191,9 +1191,10 @@ class StableDiffusion3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingle
|
|
1191 |
if linear_layer.weight.device.type == 'cpu':
|
1192 |
linear_layer.to('cuda')
|
1193 |
'''
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
|
|
1197 |
# Pass the concatenated embeddings through the linear layer
|
1198 |
clip_image_embeds = linear_layer(reshaped_embeds)
|
1199 |
|
|
|
1191 |
if linear_layer.weight.device.type == 'cpu':
|
1192 |
linear_layer.to('cuda')
|
1193 |
'''
|
1194 |
+
bs_embed, seq_len, _ = concatenated_embeds.shape
|
1195 |
+
# batch_size = concatenated_embeds.shape[0]
|
1196 |
+
image_prompt_embeds = image_prompt_embeds.repeat(1, 1, 1)
|
1197 |
+
reshaped_embeds = concatenated_embeds.view(bs_embed, seq_len, -1)
|
1198 |
# Pass the concatenated embeddings through the linear layer
|
1199 |
clip_image_embeds = linear_layer(reshaped_embeds)
|
1200 |
|