From 983033b25e0d04f7ef523624ccda9cb7fc6a8a0f Mon Sep 17 00:00:00 2001 From: GiusTex <112352961+GiusTex@users.noreply.github.com> Date: Sat, 28 Sep 2024 11:12:52 +0200 Subject: [PATCH] adding progress bar thanks to zmwv823 Comment: https://github.com/GiusTex/ComfyUI-DiffusersImageOutpaint/issues/3#issue-2554112238 --- pipeline_fill_sd_xl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pipeline_fill_sd_xl.py b/pipeline_fill_sd_xl.py index 68791ff..a6e9f17 100644 --- a/pipeline_fill_sd_xl.py +++ b/pipeline_fill_sd_xl.py @@ -26,6 +26,7 @@ from diffusers.utils.torch_utils import randn_tensor from transformers import CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer from .controlnet_union import ControlNetModel_Union +from comfy.utils import ProgressBar def latents_to_rgb(latents): @@ -470,6 +471,7 @@ class StableDiffusionXLFillPipeline(DiffusionPipeline, StableDiffusionMixin): controlnet_added_cond_kwargs = added_cond_kwargs # 8. Denoising loop + ComfyUI_ProgressBar = ProgressBar(int(num_inference_steps)) num_warmup_steps = len(timesteps) - num_inference_steps * self.scheduler.order with self.progress_bar(total=num_inference_steps) as progress_bar: @@ -547,6 +549,7 @@ class StableDiffusionXLFillPipeline(DiffusionPipeline, StableDiffusionMixin): (i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0 ): progress_bar.update() + ComfyUI_ProgressBar.update(1) yield latents_to_rgb(latents) latents = latents / self.vae.config.scaling_factor