Update README
Optimized grid creation (crop)
This commit is contained in:
LEv145
2023-04-09 14:37:24 +02:00
parent 98d3da8b3a
commit 45d044d4d0
2 changed files with 18 additions and 14 deletions
+16 -13
View File
@@ -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
+2 -1
View File
@@ -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)