Don't try to tile fill if image doesn't have an alpha layer

This commit is contained in:
Kyle Schouviller 2022-10-27 17:49:26 -07:00 committed by psychedelicious
parent 320cbdd62d
commit 43de16cae4

View File

@ -43,6 +43,10 @@ class Inpaint(Img2Img):
)
def tile_fill_missing(self, im: Image.Image, tile_size: int = 16, seed: int = None) -> Image:
# Only fill if there's an alpha layer
if im.mode != 'RGBA':
return im
a = np.asarray(im, dtype=np.uint8)
tile_size = (tile_size, tile_size)