AlekseyCalvin commited on
Commit
7883eda
·
verified ·
1 Parent(s): db6571d

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +2 -2
pipeline.py CHANGED
@@ -579,8 +579,8 @@ class FluxWithCFGPipeline(DiffusionPipeline, FluxLoraLoaderMixin, FromSingleFile
579
  )
580
 
581
  if self.do_classifier_free_guidance:
582
- prompt_embeds = torch.cat([negative_prompt_embeds, prompt_embeds], dim=0)
583
- pooled_prompt_embeds = torch.cat([negative_prompt_embeds, pooled_prompt_embeds], dim=0)
584
 
585
  # 4. Prepare latent variables
586
  num_channels_latents = self.transformer.config.in_channels // 4
 
579
  )
580
 
581
  if self.do_classifier_free_guidance:
582
+ prompt_embeds = torch.stack([negative_prompt_embeds, prompt_embeds], dim=0)
583
+ pooled_prompt_embeds = torch.stack([negative_prompt_embeds, pooled_prompt_embeds], dim=0)
584
 
585
  # 4. Prepare latent variables
586
  num_channels_latents = self.transformer.config.in_channels // 4