From 14c6d6cb3ac774eef1ac969bc5b712e878822871 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Tue, 29 Oct 2024 23:45:45 +0900 Subject: [PATCH] Disable Hires checkpoint if same as First pass checkpoint (#16269) --- modules/processing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/processing.py b/modules/processing.py index 7535b56e1..92c3582cc 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -1259,7 +1259,10 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing): if self.hr_checkpoint_info is None: raise Exception(f'Could not find checkpoint with name {self.hr_checkpoint_name}') - self.extra_generation_params["Hires checkpoint"] = self.hr_checkpoint_info.short_title + if shared.sd_model.sd_checkpoint_info == self.hr_checkpoint_info: + self.hr_checkpoint_info = None + else: + self.extra_generation_params["Hires checkpoint"] = self.hr_checkpoint_info.short_title if self.hr_sampler_name is not None and self.hr_sampler_name != self.sampler_name: self.extra_generation_params["Hires sampler"] = self.hr_sampler_name