1
0
Fork 0

fix(api): use grid tiling when inpaint margin is 0

This commit is contained in:
Sean Sube 2023-02-05 22:57:52 -06:00
parent 6fcfe4f878
commit d6c1244d72
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 3 additions and 0 deletions

View File

@ -112,6 +112,9 @@ def upscale_outpaint(
margin_y = float(max(border.top, border.bottom)) margin_y = float(max(border.top, border.bottom))
overlap = min(margin_x / source_image.width, margin_y / source_image.height) overlap = min(margin_x / source_image.width, margin_y / source_image.height)
if overlap == 0:
logger.debug("outpainting with 0 margin, using grid tiling")
output = process_tile_grid(source_image, SizeChart.auto, 1, [outpaint])
if border.left == border.right and border.top == border.bottom: if border.left == border.right and border.top == border.bottom:
logger.debug("outpainting with an even border, using spiral tiling") logger.debug("outpainting with an even border, using spiral tiling")
output = process_tile_spiral( output = process_tile_spiral(