Yinhong Liu commited on
Commit
79baf4f
·
1 Parent(s): 5703b3a

fix sd3 pipeline

Browse files
Files changed (1) hide show
  1. sid/pipeline_sid_sd3.py +3 -1
sid/pipeline_sid_sd3.py CHANGED
@@ -778,10 +778,12 @@ class SiDSD3Pipeline(
778
  timestep=t_flatten,
779
  return_dict=False,
780
  )[0]
781
- D_x = latents - t_view * flow_pred
 
782
 
783
  # 5. Decode latent to image
784
  image = self.vae.decode((D_x / self.vae.config.scaling_factor) + self.vae.config.shift_factor, return_dict=False)[0]
 
785
 
786
  # 6. Return output
787
  if not return_dict:
 
778
  timestep=t_flatten,
779
  return_dict=False,
780
  )[0]
781
+
782
+ D_x = latents - (t_view * flow_pred if torch.numel(t_view) == 1 else t_view.view(-1, 1, 1, 1) * flow_pred)
783
 
784
  # 5. Decode latent to image
785
  image = self.vae.decode((D_x / self.vae.config.scaling_factor) + self.vae.config.shift_factor, return_dict=False)[0]
786
+ image = self.image_processor.postprocess(image, output_type=output_type)
787
 
788
  # 6. Return output
789
  if not return_dict: