From 579be529da4ff54d8268608b96d2e20cce1dc740 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 29 Aug 2023 17:57:02 -0400 Subject: [PATCH] fix sd upscale --- modules/processing.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/processing.py b/modules/processing.py index 1c2401e73..6436f48c3 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -661,6 +661,9 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: cache[0] = (required_prompts, steps) return cache[1] + def infotext(_inxex=0): # dummy function overriden if there are iterations + return '' + ema_scope_context = p.sd_model.ema_scope if shared.backend == shared.Backend.ORIGINAL else nullcontext with torch.no_grad(), ema_scope_context(): with devices.autocast(): @@ -749,7 +752,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: p.scripts.postprocess_batch_list(p, batch_params, batch_number=n) x_samples_ddim = batch_params.images - def infotext(index=0): + def infotext(index=0): # pylint: disable=function-redefined # noqa: F811 return create_infotext(p, p.prompts, p.seeds, p.subseeds, index=index, all_negative_prompts=p.negative_prompts) for i, x_sample in enumerate(x_samples_ddim): @@ -824,7 +827,7 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: p, images_list=output_images, seed=p.all_seeds[0], - info=infotext() if 'infotext' in globals() else '', + info=infotext(), comments="\n".join(comments), subseed=p.all_subseeds[0], index_of_first_image=index_of_first_image,