From 7a8fed1e94df00551fd4b02509d3c883f17541ad Mon Sep 17 00:00:00 2001 From: Disty0 Date: Mon, 11 Sep 2023 12:24:54 +0300 Subject: [PATCH] Fix img2img doesn't have hires error --- modules/processing_diffusers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/processing_diffusers.py b/modules/processing_diffusers.py index 46498ef4f..13be1752e 100644 --- a/modules/processing_diffusers.py +++ b/modules/processing_diffusers.py @@ -317,7 +317,7 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro return results # optional hires pass - latent_scale_mode = shared.latent_upscale_modes.get(p.hr_upscaler, None) if p.hr_upscaler is not None else shared.latent_upscale_modes.get(shared.latent_upscale_default_mode, "None") + latent_scale_mode = shared.latent_upscale_modes.get(p.hr_upscaler, None) if (hasattr(p, "hr_upscaler") and p.hr_upscaler is not None) else shared.latent_upscale_modes.get(shared.latent_upscale_default_mode, "None") if p.is_hr_pass: p.init_hr() if p.width != p.hr_upscale_to_x or p.height != p.hr_upscale_to_y: