Spaces:
Running
on
Zero
Running
on
Zero
AlekseyCalvin
commited on
Update pipeline.py
Browse files- pipeline.py +1 -3
pipeline.py
CHANGED
@@ -184,12 +184,10 @@ class FluxWithCFGPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFile
|
|
184 |
# Use pooled output of CLIPTextModel
|
185 |
prompt_embeds = prompt_embeds.pooler_output
|
186 |
prompt_embeds = prompt_embeds.to(dtype=self.text_encoder.dtype, device=device)
|
187 |
-
|
188 |
-
_, seq_len, _ = prompt_embeds.shape
|
189 |
|
190 |
# duplicate text embeddings for each generation per prompt, using mps friendly method
|
191 |
prompt_embeds = prompt_embeds.repeat(1, num_images_per_prompt, 1)
|
192 |
-
prompt_embeds = prompt_embeds.view(batch_size * num_images_per_prompt,
|
193 |
|
194 |
return prompt_embeds
|
195 |
|
|
|
184 |
# Use pooled output of CLIPTextModel
|
185 |
prompt_embeds = prompt_embeds.pooler_output
|
186 |
prompt_embeds = prompt_embeds.to(dtype=self.text_encoder.dtype, device=device)
|
|
|
|
|
187 |
|
188 |
# duplicate text embeddings for each generation per prompt, using mps friendly method
|
189 |
prompt_embeds = prompt_embeds.repeat(1, num_images_per_prompt, 1)
|
190 |
+
prompt_embeds = prompt_embeds.view(1, batch_size * num_images_per_prompt, -1)
|
191 |
|
192 |
return prompt_embeds
|
193 |
|