mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Don't try to tile fill if image doesn't have an alpha layer
This commit is contained in:
parent
320cbdd62d
commit
43de16cae4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user