Update pipeline_stable_diffusion_3_ipa.py
Browse files
pipeline_stable_diffusion_3_ipa.py
CHANGED
@@ -1215,14 +1215,14 @@ class StableDiffusion3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingle
|
|
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 |
-
zeros_tensora = torch.zeros_like(average_image_embed).unsqueeze(0)
|
1221 |
print('shape 3: ', zeros_tensor.shape)
|
1222 |
-
print('shape 3a: ', zeros_tensora.shape)
|
1223 |
# 4. Concatenate the zeros and the average embedding
|
1224 |
clip_image_embeds = torch.cat([zeros_tensor, average_image_embed], dim=0)
|
1225 |
-
clip_image_embeds2 = torch.cat([
|
1226 |
print('shape 4: ', clip_image_embeds.shape)
|
1227 |
print('shape 4a: ', clip_image_embeds2.shape)
|
1228 |
'''
|
|
|
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 |
+
average_image_embede = torch.mean(stacked_image_embeds, dim=1) # Add batch dimension after averaging
|
1219 |
+
print('shape 2b: ', average_image_embede.shape)
|
1220 |
# 3. Create a tensor of zeros with the same shape as the averaged embedding
|
1221 |
zeros_tensor = torch.zeros_like(average_image_embed)
|
|
|
1222 |
print('shape 3: ', zeros_tensor.shape)
|
|
|
1223 |
# 4. Concatenate the zeros and the average embedding
|
1224 |
clip_image_embeds = torch.cat([zeros_tensor, average_image_embed], dim=0)
|
1225 |
+
clip_image_embeds2 = torch.cat([zeros_tensor, average_image_embede], dim=0)
|
1226 |
print('shape 4: ', clip_image_embeds.shape)
|
1227 |
print('shape 4a: ', clip_image_embeds2.shape)
|
1228 |
'''
|