Skip to content

Commit 1c0a0c4

Browse files
committed
Merge branch 'dev'
2 parents e2b177c + 7dfe959 commit 1c0a0c4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.9.3
2+
3+
### Bug Fixes:
4+
* fix get_crop_region_v2 ([#15594](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/15594))
5+
16
## 1.9.2
27

38
### Extensions and API:

modules/masking.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_crop_region_v2(mask, pad=0):
1616
mask = mask if isinstance(mask, Image.Image) else Image.fromarray(mask)
1717
if box := mask.getbbox():
1818
x1, y1, x2, y2 = box
19-
return max(x1 - pad, 0), max(y1 - pad, 0), min(x2 + pad, mask.size[0]), min(y2 + pad, mask.size[1]) if pad else box
19+
return (max(x1 - pad, 0), max(y1 - pad, 0), min(x2 + pad, mask.size[0]), min(y2 + pad, mask.size[1])) if pad else box
2020

2121

2222
def get_crop_region(mask, pad=0):

0 commit comments

Comments
 (0)