diff --git a/README.md b/README.md index 117410b..2b566bc 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,27 @@ # ImagesGrid: Comfy plugin +## Preview + +### Simple grid of images + ![Image](./workflows/mini.png) -[Workflows](./workflows/mini.json) + +### XYZPlot, like in auto1111, but with more settings + ![Image](./workflows/base.png) -[Workflows](./workflows/base.json) + +Workflows: https://github.com/LEv145/images-grid-comfy-plugin/tree/main/workflows ## How to use -### Install - +1. Download the latest stable release: https://github.com/LEv145/images-grid-comfy-plugin/archive/refs/heads/main.zip -``` -cd custom_nodes # From comfy path -git clone https://github.com/LEv145/images-grid-comfy-plugin ImagesGrid -``` -### Update -``` -cd custom_nodes/ImagesGrid -git pull -``` +2. Unpack the node to `custom_nodes`, for example in a folder `custom_nodes/ImagesGrid/` + + +## Source + +https://github.com/LEv145/images-grid-comfy-plugin diff --git a/src/utils/images_grid.py b/src/utils/images_grid.py index 9a186b8..fa24748 100644 --- a/src/utils/images_grid.py +++ b/src/utils/images_grid.py @@ -77,7 +77,8 @@ def _arrange_images_on_grid( gap: int, ): for i, image in enumerate(images): - image = image.crop((0, 0, size[0], size[1])) + if image.size != size: + image = image.crop((0, 0, *size)) x = (i % max_columns) * (size[0] + gap) y = (i // max_columns) * (size[1] + gap)