Skip to content

Commit

Permalink
Fix Progress Bar Updates in SD 1.5 PAG Img2Img pipeline (#9925)
Browse files Browse the repository at this point in the history
fix progress bar updates in SD 1.5 PAG Img2Img pipeline
  • Loading branch information
painebenjamin authored Nov 14, 2024
1 parent 1dbd26f commit d74483c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/diffusers/pipelines/pag/pipeline_pag_sd_img2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,9 @@ def __call__(
prompt_embeds = callback_outputs.pop("prompt_embeds", prompt_embeds)
negative_prompt_embeds = callback_outputs.pop("negative_prompt_embeds", negative_prompt_embeds)

if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
progress_bar.update()

if not output_type == "latent":
image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False, generator=generator)[
0
Expand Down

0 comments on commit d74483c

Please sign in to comment.