Эх сурвалжийг харах

Disable Hires checkpoint if same as First pass checkpoint (#16269)

w-e-w 9 сар өмнө
parent
commit
14c6d6cb3a
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      modules/processing.py

+ 4 - 1
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