fix: File Tile Infill being broken

This commit is contained in:
blessedcoolant 2023-08-24 12:41:05 +12:00 committed by Kent Keirsey
parent fa3fcd7820
commit 2ba52b8921

View File

@ -97,7 +97,7 @@ def tile_fill_missing(im: Image.Image, tile_size: int = 16, seed: Optional[int]
return im
# Find all invalid tiles and replace with a random valid tile
replace_count = (tiles_mask is False).sum()
replace_count = (tiles_mask == False).sum()
rng = np.random.default_rng(seed=seed)
tiles_all[np.logical_not(tiles_mask)] = filtered_tiles[rng.choice(filtered_tiles.shape[0], replace_count), :, :, :]