1
0
Fork 0

fix(api): always fill inpaint/outpaint mask with white

This commit is contained in:
Sean Sube 2023-02-11 18:55:22 -06:00
parent 6a6f482178
commit 1f06b502d5
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 1 deletions

View File

@ -181,7 +181,8 @@ def expand_image(
full_source = Image.new("RGB", dims, fill) full_source = Image.new("RGB", dims, fill)
full_source.paste(source_image, origin) full_source.paste(source_image, origin)
full_mask = mask_filter(mask_image, dims, origin, fill=fill) # new mask pixels need to be filled with white so they will be replaced
full_mask = mask_filter(mask_image, dims, origin, fill="white")
full_noise = noise_source(source_image, dims, origin, fill=fill) full_noise = noise_source(source_image, dims, origin, fill=fill)
full_noise = ImageChops.multiply(full_noise, full_mask) full_noise = ImageChops.multiply(full_noise, full_mask)