mirror of
https://github.com/sd-webui/stable-diffusion-webui.git
synced 2024-12-14 23:02:00 +03:00
Don't attempt mask restoration when there is no mask given (#1186)
This commit is contained in:
parent
b856a91ec8
commit
d22cf56395
@ -291,7 +291,7 @@ def img2img(prompt: str = '', init_info: any = None, init_info_mask: any = None,
|
||||
correction_target,
|
||||
channel_axis=2
|
||||
), cv2.COLOR_LAB2RGB).astype("uint8"))
|
||||
if mask_restore is True:
|
||||
if mask_restore is True and init_mask is not None:
|
||||
color_mask = init_mask.filter(ImageFilter.GaussianBlur(mask_blur_strength))
|
||||
color_mask = color_mask.convert('L')
|
||||
source_image = input_image.convert('RGB')
|
||||
|
Loading…
Reference in New Issue
Block a user