aboutsummaryrefslogtreecommitdiff
path: root/modules/masking.py
diff options
context:
space:
mode:
authorAngelBottomless <35677394+aria1th@users.noreply.github.com>2022-11-04 15:51:09 +0900
committerGitHub <noreply@github.com>2022-11-04 15:51:09 +0900
commit179702adc40cc8d9c97ae883ee9d0f7c79076047 (patch)
tree34b166971e0d8b5b2b8a7ec631d7395072f3f218 /modules/masking.py
parent0d07cbfa15d34294a4fa22d74359cdd6fe2f799c (diff)
parentf2b69709eaff88fc3a2bd49585556ec0883bf5ea (diff)
Merge branch 'AUTOMATIC1111:master' into force-push-patch-13
Diffstat (limited to 'modules/masking.py')
-rw-r--r--modules/masking.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/masking.py b/modules/masking.py
index fd8d9241..a5c4d2da 100644
--- a/modules/masking.py
+++ b/modules/masking.py
@@ -49,7 +49,7 @@ def expand_crop_region(crop_region, processing_width, processing_height, image_w
ratio_processing = processing_width / processing_height
if ratio_crop_region > ratio_processing:
- desired_height = (x2 - x1) * ratio_processing
+ desired_height = (x2 - x1) / ratio_processing
desired_height_diff = int(desired_height - (y2-y1))
y1 -= desired_height_diff//2
y2 += desired_height_diff - desired_height_diff//2