AlekseyCalvin commited on
Commit
1186e90
·
verified ·
1 Parent(s): b5ea7bd

Update pipeline.py

Browse files
Files changed (1) hide show
  1. 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, seq_len, -1)
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