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

test latent fix

Browse files
Files changed (1) hide show
  1. pipeline.py +4 -3
pipeline.py CHANGED
@@ -641,8 +641,9 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
641
  if upscale:
642
  return latents, None, None
643
  # scale the initial noise by the standard deviation required by the scheduler
644
- latents = latents * self.scheduler.init_noise_sigma
645
- return latents, None, None
 
646
  else:
647
  init_latent_dist = self.vae.encode(image).latent_dist
648
  init_latents = init_latent_dist.sample(generator=generator)
@@ -1039,7 +1040,7 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
1039
  )
1040
 
1041
  latents = torch.nn.functional.interpolate(latents, size=(int(height*resize_scale)//8, int(width*resize_scale)//8))
1042
-
1043
  return self.__call__(
1044
  prompt=prompt,
1045
  negative_prompt=negative_prompt,
 
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)
 
1040
  )
1041
 
1042
  latents = torch.nn.functional.interpolate(latents, size=(int(height*resize_scale)//8, int(width*resize_scale)//8))
1043
+ co
1044
  return self.__call__(
1045
  prompt=prompt,
1046
  negative_prompt=negative_prompt,