poipiii commited on
Commit
fa64057
1 Parent(s): 9635917

test latent fix

Browse files
Files changed (1) hide show
  1. pipeline.py +5 -5
pipeline.py CHANGED
@@ -638,12 +638,12 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
638
  raise ValueError(f"Unexpected latents shape, got {latents.shape}, expected {shape}")
639
  latents = latents.to(device)
640
 
641
- if upscale:
642
- return latents, None, None
643
  # scale the initial noise by the standard deviation required by the scheduler
644
- else:
645
- latents = latents * self.scheduler.init_noise_sigma
646
- return latents, None, None
647
  else:
648
  init_latent_dist = self.vae.encode(image).latent_dist
649
  init_latents = init_latent_dist.sample(generator=generator)
 
638
  raise ValueError(f"Unexpected latents shape, got {latents.shape}, expected {shape}")
639
  latents = latents.to(device)
640
 
641
+ # if upscale:
642
+ # return latents, None, None
643
  # scale the initial noise by the standard deviation required by the scheduler
644
+ # else:
645
+ latents = latents * self.scheduler.init_noise_sigma
646
+ return latents, None, None
647
  else:
648
  init_latent_dist = self.vae.encode(image).latent_dist
649
  init_latents = init_latent_dist.sample(generator=generator)