Merge cf10f5b63690c2a86790bd2281fb669524cf980d into 374bb6cc384d2a19422c0b07d69de0a41d1f3f4d

This commit is contained in:
Andray 2025-03-06 23:16:52 +08:00 committed by GitHub
commit 880896e8f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -151,6 +151,8 @@ class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing):
upscaled_image = self.upscale(pp.image, pp.info, upscaler1, upscale_mode, upscale_by, max_side_length, upscale_to_width, upscale_to_height, upscale_crop)
pp.info["Postprocess upscaler"] = upscaler1.name
if shared.opts.use_upscaler_name_as_suffix:
pp.nametags.append(upscaler_1_name)
if upscaler2 and upscaler_2_visibility > 0:
second_upscale = self.upscale(pp.image, pp.info, upscaler2, upscale_mode, upscale_by, max_side_length, upscale_to_width, upscale_to_height, upscale_crop)
@ -159,6 +161,8 @@ class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing):
upscaled_image = Image.blend(upscaled_image, second_upscale, upscaler_2_visibility)
pp.info["Postprocess upscaler 2"] = upscaler2.name
if shared.opts.use_upscaler_name_as_suffix:
pp.nametags.append(f'{upscaler_2_name} {upscaler_2_visibility}')
pp.image = upscaled_image