1inkusFace commited on
Commit
36b3e5b
·
verified ·
1 Parent(s): 9d2f41d

Update pipeline_stable_diffusion_3_ipa.py

Browse files
Files changed (1) hide show
  1. pipeline_stable_diffusion_3_ipa.py +3 -1
pipeline_stable_diffusion_3_ipa.py CHANGED
@@ -1211,8 +1211,10 @@ class StableDiffusion3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingle
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
1214
- average_image_embed = torch.mean(stacked_image_embeds, dim=0) #.unsqueeze(0) # Add batch dimension after averaging
1215
  print('shape 2: ', average_image_embed.shape)
 
 
1216
  # 3. Create a tensor of zeros with the same shape as the averaged embedding
1217
  zeros_tensor = torch.zeros_like(average_image_embed)
1218
  print('shape 3: ', zeros_tensor.shape)
 
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
1214
+ average_image_embed = torch.mean(stacked_image_embeds, dim=1) #.unsqueeze(0) # Add batch dimension after averaging
1215
  print('shape 2: ', average_image_embed.shape)
1216
+ average_image_embedf = torch.mean(stacked_image_embeds, dim=1).unsqueeze(0) # Add batch dimension after averaging
1217
+ print('shape 2a: ', average_image_embedf.shape)
1218
  # 3. Create a tensor of zeros with the same shape as the averaged embedding
1219
  zeros_tensor = torch.zeros_like(average_image_embed)
1220
  print('shape 3: ', zeros_tensor.shape)