fix: mask size when using skip img2img

This commit is contained in:
Dowon
2024-03-21 18:59:57 +09:00
parent 55571ab646
commit 9c6d98263a
2 changed files with 7 additions and 2 deletions

View File

@@ -1 +1 @@
__version__ = "24.3.1"
__version__ = "24.3.2-dev.0"

View File

@@ -652,7 +652,12 @@ class AfterDetailerScript(scripts.Script):
if p.inpainting_mask_invert:
mask = ImageChops.invert(mask)
mask = create_binary_mask(mask)
return images.resize_image(p.resize_mode, mask, p.width, p.height)
if getattr(p, "_ad_skip_img2img", False):
width, height = p.init_images[0].size
else:
width, height = p.width, p.height
return images.resize_image(p.resize_mode, mask, width, height)
@rich_traceback
def process(self, p, *args_):