Stable-X commited on
Commit
e9293a8
1 Parent(s): 557687d

Update stablenormal/pipeline_yoso_normal.py

Browse files
stablenormal/pipeline_yoso_normal.py CHANGED
@@ -181,7 +181,6 @@ class YOSONormalsPipeline(StableDiffusionControlNetPipeline):
181
  self.prompt_embeds = None
182
  self.empty_text_embedding = empty_text_embedding
183
  self.t_start= t_start # target_out latents
184
- self.gauss_latent = None
185
 
186
  def check_inputs(
187
  self,
@@ -522,7 +521,6 @@ class YOSONormalsPipeline(StableDiffusionControlNetPipeline):
522
  return_dict=False,
523
  )
524
 
525
-
526
  # 7. YOSO sampling
527
  latent_x_t = self.unet(
528
  gauss_latent,
@@ -587,11 +585,7 @@ class YOSONormalsPipeline(StableDiffusionControlNetPipeline):
587
  ) # [N,4,h,w]
588
  image_latent = image_latent * self.vae.config.scaling_factor
589
  image_latent = image_latent.repeat_interleave(ensemble_size, dim=0) # [N*E,4,h,w]
590
-
591
- pred_latent = self.gauss_latent
592
- if pred_latent is None:
593
- self.gauss_latent = torch.randn_like(image_latent)
594
- pred_latent = self.gauss_latent
595
 
596
  return image_latent, pred_latent
597
 
 
181
  self.prompt_embeds = None
182
  self.empty_text_embedding = empty_text_embedding
183
  self.t_start= t_start # target_out latents
 
184
 
185
  def check_inputs(
186
  self,
 
521
  return_dict=False,
522
  )
523
 
 
524
  # 7. YOSO sampling
525
  latent_x_t = self.unet(
526
  gauss_latent,
 
585
  ) # [N,4,h,w]
586
  image_latent = image_latent * self.vae.config.scaling_factor
587
  image_latent = image_latent.repeat_interleave(ensemble_size, dim=0) # [N*E,4,h,w]
588
+ pred_latent = torch.randn_like(image_latent)
 
 
 
 
589
 
590
  return image_latent, pred_latent
591