Merge pull request #138 from rkfg/default-fix

Fix custom scale/size fields not displaying
master
Anton Antonov 2024-03-08 19:55:37 +03:00 committed by GitHub
commit 2322caa480
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -507,6 +507,16 @@ class Script(scripts.Script):
outputs=[custom_width, custom_height, custom_scale]
)
def init_field(scale_name):
try:
scale_index = target_size_types.index(scale_name)
custom_width.visible = custom_height.visible = scale_index == 1
custom_scale.visible = scale_index == 2
except:
pass
target_size_type.init_field = init_field
return [info, tile_width, tile_height, mask_blur, padding, seams_fix_width, seams_fix_denoise, seams_fix_padding,
upscaler_index, save_upscaled_image, redraw_mode, save_seams_fix_image, seams_fix_mask_blur,
seams_fix_type, target_size_type, custom_width, custom_height, custom_scale]