mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-08 19:40:33 -08:00
improve get_crop_region
This commit is contained in:
parent
f939bce845
commit
e36827af32
2 changed files with 10 additions and 35 deletions
|
|
@ -1562,7 +1562,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
|||
if self.inpaint_full_res:
|
||||
self.mask_for_overlay = image_mask
|
||||
mask = image_mask.convert('L')
|
||||
crop_region = masking.get_crop_region(np.array(mask), self.inpaint_full_res_padding)
|
||||
crop_region = masking.get_crop_region(mask, self.inpaint_full_res_padding)
|
||||
crop_region = masking.expand_crop_region(crop_region, self.width, self.height, mask.width, mask.height)
|
||||
x1, y1, x2, y2 = crop_region
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue