InvokeAI/invokeai/backend/image_util
psychedelicious f0b1bb0327 feat(nodes): redo tile infill
The previous algorithm errored if the image wasn't divisible by the tile size. I've reimplemented it from scratch to mitigate this issue.

The new algorithm is simpler. We create a pool of tiles, then use them to create an image composed completely of tiles. If there is any awkwardly sized space on the edge of the image, the tiles are cropped to fit.

Finally, paste the original image over the tile image.

I've added a jupyter notebook to do a smoke test of infilling methods, and 10 test images.

The other infill algorithms can be easily tested with the notebook on the same images, though I didn't set that up yet.

Tested and confirmed this gives results just as good as the earlier infill, though of course they aren't the same due to the change in the algorithm.
2024-04-05 08:49:13 +11:00
..
basicsr feat(backend): remove dependency on basicsr 2024-02-11 08:34:54 +11:00
depth_anything cleanup: remove unused scripts, cruft 2024-03-20 15:05:25 +11:00
dw_openpose cleanup: remove unused scripts, cruft 2024-03-20 15:05:25 +11:00
infill_methods feat(nodes): redo tile infill 2024-04-05 08:49:13 +11:00
realesrgan feat(backend): remove dependency on basicsr 2024-02-11 08:34:54 +11:00
__init__.py wip: Initial Infill Methods Refactor 2024-04-05 08:49:13 +11:00
canny.py tidy: "fit_image_to_resolution" -> "resize_image_to_resolution" 2024-03-21 07:02:57 -07:00
hed.py tidy: "fit_image_to_resolution" -> "resize_image_to_resolution" 2024-03-21 07:02:57 -07:00
invisible_watermark.py fix(config): fix invisible_watermark handling 2024-03-19 09:24:28 +11:00
lineart_anime.py tidy: "fit_image_to_resolution" -> "resize_image_to_resolution" 2024-03-21 07:02:57 -07:00
lineart.py tidy: "fit_image_to_resolution" -> "resize_image_to_resolution" 2024-03-21 07:02:57 -07:00
pngwriter.py chore: ruff 2024-03-01 10:42:33 +11:00
safety_checker.py tidy: do not show msg when loading NSFW checker 2024-03-20 15:05:25 +11:00
seamless.py chore: pyflake lint fixes 2023-08-29 05:16:23 +12:00
util.py tidy: "fit_image_to_resolution" -> "resize_image_to_resolution" 2024-03-21 07:02:57 -07:00