aboutsummaryrefslogtreecommitdiffstats
path: root/modules/masking.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-01-04 15:39:57 +0000
committerGitHub <noreply@github.com>2023-01-04 15:39:57 +0000
commit37aafdb059fc038df7217a907048f7eb61f0beee (patch)
tree5ddecfd6d96d6bb1fea556a75fff58782ffcec3b /modules/masking.py
parent4fbdbddc18b21f712acae58bf41740d27023285f (diff)
parenta8eb9e3bf814f72293e474c11e9ff0098859a942 (diff)
downloadstable-diffusion-webui-gfx803-37aafdb059fc038df7217a907048f7eb61f0beee.tar.gz
stable-diffusion-webui-gfx803-37aafdb059fc038df7217a907048f7eb61f0beee.tar.bz2
stable-diffusion-webui-gfx803-37aafdb059fc038df7217a907048f7eb61f0beee.zip
Merge branch 'master' into master
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