Skip to content

Commit

Permalink
fix(api): always fill inpaint/outpaint mask with white
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 12, 2023
1 parent 6a6f482 commit 1f06b50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/onnx_web/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def expand_image(
full_source = Image.new("RGB", dims, fill)
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 = ImageChops.multiply(full_noise, full_mask)

Expand Down

0 comments on commit 1f06b50

Please sign in to comment.