Update pipeline_stable_diffusion_3_ipa.py
Browse files
pipeline_stable_diffusion_3_ipa.py
CHANGED
@@ -1179,7 +1179,9 @@ class StableDiffusion3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingle
|
|
1179 |
|
1180 |
# Create a linear layer
|
1181 |
embedding_dim = concatenated_embeds.shape[-1] # Get the embedding dimension
|
1182 |
-
|
|
|
|
|
1183 |
# Move `concatenated_embeds` to the GPU if it's on the CPU
|
1184 |
'''
|
1185 |
if concatenated_embeds.device.type == 'cpu':
|
|
|
1179 |
|
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 |
'''
|
1187 |
if concatenated_embeds.device.type == 'cpu':
|