Skip to content

Commit

Permalink
fix: mask size when using skip img2img
Browse files Browse the repository at this point in the history
  • Loading branch information
Bing-su committed Mar 21, 2024
1 parent 55571ab commit 9c6d982
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adetailer/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "24.3.1"
__version__ = "24.3.2-dev.0"
7 changes: 6 additions & 1 deletion scripts/!adetailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_):
Expand Down

0 comments on commit 9c6d982

Please sign in to comment.