From 3027e5bf9da038228e96c250220bb7070f9ae447 Mon Sep 17 00:00:00 2001 From: Ryan Dick Date: Tue, 16 Jul 2024 11:28:57 -0400 Subject: [PATCH] Add tqdm logging to the tile loop of TiledStableDiffusionRefineInvocation. --- invokeai/app/invocations/tiled_stable_diffusion_refine.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/invokeai/app/invocations/tiled_stable_diffusion_refine.py b/invokeai/app/invocations/tiled_stable_diffusion_refine.py index b1efa967de..f43b5d610a 100644 --- a/invokeai/app/invocations/tiled_stable_diffusion_refine.py +++ b/invokeai/app/invocations/tiled_stable_diffusion_refine.py @@ -6,6 +6,7 @@ import torch from diffusers.models.unets.unet_2d_condition import UNet2DConditionModel from PIL import Image from pydantic import field_validator +from tqdm import tqdm from invokeai.app.invocations.baseinvocation import BaseInvocation, Classification, invocation from invokeai.app.invocations.constants import DEFAULT_PRECISION, LATENT_SCALE_FACTOR @@ -284,8 +285,10 @@ class TiledStableDiffusionRefineInvocation(BaseInvocation): controlnet_data_tiles.append(tile_controlnet_data) # Denoise (i.e. "refine") each tile independently. - for latent_tile, noise_tile, controlnet_data_tile in zip( - latent_tiles, noise_tiles, controlnet_data_tiles, strict=True + for latent_tile, noise_tile, controlnet_data_tile in tqdm( + zip(latent_tiles, noise_tiles, controlnet_data_tiles, strict=True), + desc="Refining tiles", + total=len(latent_tiles), ): assert latent_tile.shape == noise_tile.shape