Update pipeline_stable_diffusion_3_ipa.py
Browse files
pipeline_stable_diffusion_3_ipa.py
CHANGED
@@ -1180,7 +1180,7 @@ class StableDiffusion3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingle
|
|
1180 |
# Create a linear layer
|
1181 |
embedding_dim = concatenated_embeds.shape[-1] # Get the embedding dimension
|
1182 |
num_images = len(image_prompt_embeds_list)
|
1183 |
-
|
1184 |
linear_layer = nn.Linear(input_dim, embedding_dim, dtype=torch.bfloat16).to(device)
|
1185 |
# Move `concatenated_embeds` to the GPU if it's on the CPU
|
1186 |
'''
|
|
|
1180 |
# Create a linear layer
|
1181 |
embedding_dim = concatenated_embeds.shape[-1] # Get the embedding dimension
|
1182 |
num_images = len(image_prompt_embeds_list)
|
1183 |
+
input_dim = num_images * embedding_dim
|
1184 |
linear_layer = nn.Linear(input_dim, embedding_dim, dtype=torch.bfloat16).to(device)
|
1185 |
# Move `concatenated_embeds` to the GPU if it's on the CPU
|
1186 |
'''
|