diff --git a/adetailer/__version__.py b/adetailer/__version__.py index c83195c..1362b0d 100644 --- a/adetailer/__version__.py +++ b/adetailer/__version__.py @@ -1 +1 @@ -__version__ = "24.3.1" +__version__ = "24.3.2-dev.0" diff --git a/scripts/!adetailer.py b/scripts/!adetailer.py index 8706e15..75a1e19 100644 --- a/scripts/!adetailer.py +++ b/scripts/!adetailer.py @@ -652,7 +652,12 @@ def get_image_mask(p) -> Image.Image: 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_):