poipiii commited on
Commit
a833a48
1 Parent(s): 144af9f

test latent fix

Browse files
Files changed (1) hide show
  1. pipeline.py +7 -4
pipeline.py CHANGED
@@ -625,7 +625,8 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
625
  height // self.vae_scale_factor,
626
  width // self.vae_scale_factor,
627
  )
628
-
 
629
  if latents is None:
630
  if device.type == "mps":
631
  # randn does not work reproducibly on mps
@@ -654,6 +655,9 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
654
  else:
655
  noise = torch.randn(shape, generator=generator, device=device, dtype=dtype)
656
  latents = self.scheduler.add_noise(init_latents, noise, timestep)
 
 
 
657
  return latents, init_latents_orig, noise
658
 
659
  @torch.no_grad()
@@ -809,9 +813,8 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
809
  generator,
810
  latents,
811
  )
812
- print("noise")
813
- print(noise.shape)
814
- print(noise)
815
 
816
  # 7. Prepare extra step kwargs. TODO: Logic should ideally just be moved out of the pipeline
817
  extra_step_kwargs = self.prepare_extra_step_kwargs(generator, eta)
 
625
  height // self.vae_scale_factor,
626
  width // self.vae_scale_factor,
627
  )
628
+ print("shape in prepare_latents")
629
+ print(shape)
630
  if latents is None:
631
  if device.type == "mps":
632
  # randn does not work reproducibly on mps
 
655
  else:
656
  noise = torch.randn(shape, generator=generator, device=device, dtype=dtype)
657
  latents = self.scheduler.add_noise(init_latents, noise, timestep)
658
+ print("noise in prepare_latents")
659
+ print(noise)
660
+
661
  return latents, init_latents_orig, noise
662
 
663
  @torch.no_grad()
 
813
  generator,
814
  latents,
815
  )
816
+ # print("noise")
817
+ # print(noise)
 
818
 
819
  # 7. Prepare extra step kwargs. TODO: Logic should ideally just be moved out of the pipeline
820
  extra_step_kwargs = self.prepare_extra_step_kwargs(generator, eta)