aboutsummaryrefslogtreecommitdiff
path: root/modules/masking.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-11-04 10:54:17 +0300
committerGitHub <noreply@github.com>2022-11-04 10:54:17 +0300
commit24fc05cf576c80976773d09b341b9c9b2274a492 (patch)
tree89829bec0144ac0da7c0ae340cd8435427efb01e /modules/masking.py
parenta613fbc05e037622e1f20667d428be3f72894f16 (diff)
parent352b33106a64a8c34d1f5d79fcb377a73b02e39c (diff)
Merge branch 'master' into fix-ckpt-cache
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