1inkusFace commited on
Commit
08bea07
·
verified ·
1 Parent(s): 7115aba

Update pipeline_stable_diffusion_3_ipa.py

Browse files
Files changed (1) hide show
  1. pipeline_stable_diffusion_3_ipa.py +4 -3
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
- batch_size = concatenated_embeds.shape[0]
1196
- reshaped_embeds = concatenated_embeds.view(batch_size, input_dim)
 
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