multimodalart HF staff commited on
Commit
6e5895d
1 Parent(s): 2c3cc35

Update live_preview_helpers.py

Browse files
Files changed (1) hide show
  1. live_preview_helpers.py +1 -2
live_preview_helpers.py CHANGED
@@ -148,14 +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
161
  latents = self._unpack_latents(latents, height, width, self.vae_scale_factor)
 
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
  torch.cuda.empty_cache()
157
+ latents = self.scheduler.step(noise_pred, t, latents, return_dict=False)[0]
158
 
159
  # Final image using good_vae
160
  latents = self._unpack_latents(latents, height, width, self.vae_scale_factor)