fix crash in inpaint when no seed in original image

This commit is contained in:
Lincoln Stein 2022-11-12 17:57:28 +00:00
parent 1a8e007066
commit 98db0d746c

View File

@ -169,7 +169,8 @@ class Inpaint(Img2Img):
# Fill missing areas of original image
init_filled = self.tile_fill_missing(
self.pil_image.copy(),
seed = self.seed if self.seed >= 0 else self.new_seed(),
seed = self.seed if (self.seed is not None
and self.seed >= 0) else self.new_seed(),
tile_size = tile_size
)
init_filled.paste(init_image, (0,0), init_image.split()[-1])