v 2.1.7
Update README Optimized grid creation (crop)
This commit is contained in:
@@ -1,24 +1,27 @@
|
|||||||
# ImagesGrid: Comfy plugin
|
# ImagesGrid: Comfy plugin
|
||||||
|
|
||||||
|
|
||||||
|
## Preview
|
||||||
|
|
||||||
|
### Simple grid of images
|
||||||
|
|
||||||

|

|
||||||
[Workflows](./workflows/mini.json)
|
|
||||||
|
### XYZPlot, like in auto1111, but with more settings
|
||||||
|
|
||||||

|

|
||||||
[Workflows](./workflows/base.json)
|
|
||||||
|
Workflows: https://github.com/LEv145/images-grid-comfy-plugin/tree/main/workflows
|
||||||
|
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
### Install
|
1. Download the latest stable release:
|
||||||
|
|
||||||
https://github.com/LEv145/images-grid-comfy-plugin/archive/refs/heads/main.zip
|
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
|
|
||||||
|
|
||||||
```
|
2. Unpack the node to `custom_nodes`, for example in a folder `custom_nodes/ImagesGrid/`
|
||||||
cd custom_nodes/ImagesGrid
|
|
||||||
git pull
|
|
||||||
```
|
## Source
|
||||||
|
|
||||||
|
https://github.com/LEv145/images-grid-comfy-plugin
|
||||||
|
|||||||
@@ -77,7 +77,8 @@ def _arrange_images_on_grid(
|
|||||||
gap: int,
|
gap: int,
|
||||||
):
|
):
|
||||||
for i, image in enumerate(images):
|
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)
|
x = (i % max_columns) * (size[0] + gap)
|
||||||
y = (i // max_columns) * (size[1] + gap)
|
y = (i // max_columns) * (size[1] + gap)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user