diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-04 08:00:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 08:00:32 +0000 |
commit | e9c767d8dba884762b39d36fbd7cd43f818acf24 (patch) | |
tree | b1d1a0cb9a445443ec18524b0c3906e94d21a26e /modules/masking.py | |
parent | b2c48091db394c2b7d375a33f18d90c924cd4363 (diff) | |
parent | 2913b9f02500049c76c3d1469c086767411cefa9 (diff) | |
download | stable-diffusion-webui-gfx803-e9c767d8dba884762b39d36fbd7cd43f818acf24.tar.gz stable-diffusion-webui-gfx803-e9c767d8dba884762b39d36fbd7cd43f818acf24.tar.bz2 stable-diffusion-webui-gfx803-e9c767d8dba884762b39d36fbd7cd43f818acf24.zip |
Merge branch 'master' into 7flash/fix-api-compatibility
Diffstat (limited to 'modules/masking.py')
-rw-r--r-- | modules/masking.py | 2 |
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
|