multimodalart HF staff commited on
Commit
30d9499
1 Parent(s): 1f2f9cf

Update live_preview_helpers.py

Browse files
Files changed (1) hide show
  1. live_preview_helpers.py +2 -2
live_preview_helpers.py CHANGED
@@ -148,13 +148,13 @@ def flux_pipe_call_that_returns_an_iterable_of_images(
148
  joint_attention_kwargs=self.joint_attention_kwargs,
149
  return_dict=False,
150
  )[0]
151
- latents = self.scheduler.step(noise_pred, t, latents, return_dict=False)[0]
152
-
153
  # Yield intermediate result
154
  latents_for_image = self._unpack_latents(latents, height, width, self.vae_scale_factor)
155
  latents_for_image = (latents_for_image / self.vae.config.scaling_factor) + self.vae.config.shift_factor
156
  image = self.vae.decode(latents_for_image, return_dict=False)[0]
157
  yield self.image_processor.postprocess(image, output_type=output_type)[0]
 
 
158
  torch.cuda.empty_cache()
159
 
160
  # Final image using good_vae
 
148
  joint_attention_kwargs=self.joint_attention_kwargs,
149
  return_dict=False,
150
  )[0]
 
 
151
  # Yield intermediate result
152
  latents_for_image = self._unpack_latents(latents, height, width, self.vae_scale_factor)
153
  latents_for_image = (latents_for_image / self.vae.config.scaling_factor) + self.vae.config.shift_factor
154
  image = self.vae.decode(latents_for_image, return_dict=False)[0]
155
  yield self.image_processor.postprocess(image, output_type=output_type)[0]
156
+
157
+ latents = self.scheduler.step(noise_pred, t, latents, return_dict=False)[0]
158
  torch.cuda.empty_cache()
159
 
160
  # Final image using good_vae