mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-02 22:02:50 -08:00
Merge 2cb3c2da3f into fd68e0c384
This commit is contained in:
commit
ac074af958
3 changed files with 49 additions and 0 deletions
|
|
@ -1642,6 +1642,8 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
|||
crop_region = masking.get_crop_region_v2(mask, self.inpaint_full_res_padding)
|
||||
if crop_region:
|
||||
crop_region = masking.expand_crop_region(crop_region, self.width, self.height, mask.width, mask.height)
|
||||
if shared.opts.forbid_too_small_crop_region:
|
||||
crop_region = masking.expand_too_small_crop_region(crop_region, self.width, self.height, mask.width, mask.height)
|
||||
x1, y1, x2, y2 = crop_region
|
||||
mask = mask.crop(crop_region)
|
||||
image_mask = images.resize_image(2, mask, self.width, self.height)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue