fix resizing of inpainting mask

- change image resampling method for mask shrinkage to prevent
  artifacts at edge of mask

Addresses #625
This commit is contained in:
Lincoln Stein 2022-09-24 04:37:34 -04:00
parent 660641e720
commit bf21a0bf02

View File

@ -928,7 +928,7 @@ class Generate:
# BUG: We need to use the model's downsample factor rather than hardcoding "8"
from ldm.dream.generator.base import downsampling
image = image.resize((image.width//downsampling, image.height //
downsampling), resample=Image.Resampling.LANCZOS)
downsampling), resample=Image.Resampling.NEAREST)
# print(
# f'>> DEBUG: writing the mask to mask.png'
# )