@@ -1,23 +1,27 @@
|
||||
# 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
|
||||
|
||||
### 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
|
||||
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
|
||||
|
||||
+8
-1
@@ -1,4 +1,10 @@
|
||||
from .src import LatentCombineNode, ImagesGridByColumnsNode, ImagesGridByRowsNode, ImageCombineNode
|
||||
from .src import (
|
||||
LatentCombineNode,
|
||||
ImagesGridByColumnsNode,
|
||||
ImagesGridByRowsNode,
|
||||
ImageCombineNode,
|
||||
GridAnnotationNode,
|
||||
)
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
@@ -6,4 +12,5 @@ NODE_CLASS_MAPPINGS = {
|
||||
"ImagesGridByColumns": ImagesGridByColumnsNode,
|
||||
"ImagesGridByRows": ImagesGridByRowsNode,
|
||||
"ImageCombine": ImageCombineNode,
|
||||
"GridAnnotation": GridAnnotationNode,
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from .nodes.images_grid import ImagesGridByColumnsNode, ImagesGridByRowsNode
|
||||
from .nodes.latent_combine import LatentCombineNode
|
||||
from .nodes.image_combine import ImageCombineNode
|
||||
from .nodes.grid_annotation import GridAnnotationNode
|
||||
|
||||
+4
-3
@@ -1,9 +1,10 @@
|
||||
import typing as t
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
STATIC_PATH = Path(__file__).parent.parent / "static"
|
||||
|
||||
|
||||
class BaseNode():
|
||||
CATEGORY: str = "ImagesGrid"
|
||||
FUNCTION: str = "execute"
|
||||
|
||||
|
||||
Image = t.Any
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
import typing as t
|
||||
|
||||
from PIL import ImageFont
|
||||
|
||||
from ..base import BaseNode, STATIC_PATH
|
||||
from ..utils import Annotation
|
||||
|
||||
|
||||
class GridAnnotationNode(BaseNode):
|
||||
RETURN_TYPES: tuple[str] = ("GRID_ANNOTATION",)
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls) -> dict[str, t.Any]:
|
||||
return {
|
||||
"required": {
|
||||
"column_texts": ("STRING", {"multiline": False}),
|
||||
"row_texts": ("STRING", {"multiline": False}),
|
||||
"font_size": ("INT", {"default": 50, "min": 1}),
|
||||
},
|
||||
}
|
||||
|
||||
def execute(
|
||||
self,
|
||||
column_texts: str,
|
||||
row_texts: str,
|
||||
font_size: int,
|
||||
) -> tuple[Annotation]:
|
||||
font = ImageFont.truetype(str(STATIC_PATH / "Roboto-Regular.ttf"), size=font_size)
|
||||
column_texts_list = self._set_value_to_texts_list(
|
||||
self._get_texts_from_string(column_texts),
|
||||
)
|
||||
row_texts_list = self._set_value_to_texts_list(
|
||||
self._get_texts_from_string(row_texts),
|
||||
)
|
||||
|
||||
result = Annotation(column_texts=column_texts_list, row_texts=row_texts_list, font=font)
|
||||
return (result,)
|
||||
|
||||
def _get_texts_from_string(self, string: str) -> list[str]:
|
||||
return [
|
||||
result
|
||||
for i in string.split(";")
|
||||
if (result := i.strip()) != ""
|
||||
]
|
||||
|
||||
def _set_value_to_texts_list(self, texts_list: list[str]) -> list[str]:
|
||||
if not texts_list:
|
||||
return ["None"]
|
||||
return texts_list
|
||||
@@ -2,14 +2,14 @@ import typing as t
|
||||
|
||||
import torch
|
||||
|
||||
from ..base import BaseNode, Image
|
||||
from ..base import BaseNode
|
||||
|
||||
|
||||
class ImageCombineNode(BaseNode):
|
||||
RETURN_TYPES: t.Tuple[str] = ("IMAGE",)
|
||||
RETURN_TYPES: tuple[str] = ("IMAGE",)
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls) -> t.Dict[str, t.Any]:
|
||||
def INPUT_TYPES(cls) -> dict[str, t.Any]:
|
||||
return {
|
||||
"required": {
|
||||
"image_1": ("IMAGE",),
|
||||
@@ -19,14 +19,9 @@ class ImageCombineNode(BaseNode):
|
||||
|
||||
def execute(
|
||||
self,
|
||||
image_1: Image,
|
||||
image_2: Image,
|
||||
) -> t.Tuple[Image]:
|
||||
print(image_1.size())
|
||||
print(image_2.size())
|
||||
print(image_1)
|
||||
|
||||
image_1: torch.Tensor,
|
||||
image_2: torch.Tensor,
|
||||
) -> tuple[torch.Tensor]:
|
||||
result = torch.cat((image_1, image_2), 0)
|
||||
print(result.size())
|
||||
|
||||
return (result,)
|
||||
|
||||
+32
-14
@@ -1,30 +1,48 @@
|
||||
import typing as t
|
||||
|
||||
from ..base import BaseNode, Image
|
||||
import torch
|
||||
|
||||
from ..base import BaseNode
|
||||
from ..utils import (
|
||||
tensor_to_pillow,
|
||||
pillow_to_tensor,
|
||||
create_image_grid_by_columns,
|
||||
create_image_grid_by_rows,
|
||||
create_images_grid_by_columns,
|
||||
create_images_grid_by_rows,
|
||||
Annotation,
|
||||
)
|
||||
|
||||
|
||||
class BaseImagesGridNode(BaseNode):
|
||||
RETURN_TYPES: t.Tuple[str] = ("IMAGE",)
|
||||
RETURN_TYPES: tuple[str] = ("IMAGE",)
|
||||
|
||||
@classmethod
|
||||
def _create_input_types(cls, coordinate_name: str) -> t.Dict[str, t.Any]:
|
||||
def _create_input_types(cls, coordinate_name: str) -> dict[str, t.Any]:
|
||||
return {
|
||||
"required": {
|
||||
"images": ("IMAGE",),
|
||||
"gap": ("INT", {"default": 0, "min": 0}),
|
||||
coordinate_name: ("INT", {"default": 1, "min": 1}),
|
||||
},
|
||||
"optional": {
|
||||
"annotation": ("GRID_ANNOTATION",),
|
||||
}
|
||||
}
|
||||
|
||||
def _create_execute(self, images, function, function_kw) -> t.Tuple[Image]:
|
||||
def _create_execute(
|
||||
self,
|
||||
function: t.Callable,
|
||||
\
|
||||
images: torch.Tensor,
|
||||
gap: int,
|
||||
annotation: Annotation | None = None,
|
||||
**kw,
|
||||
) -> tuple[torch.Tensor]:
|
||||
pillow_images = [tensor_to_pillow(i) for i in images]
|
||||
pillow_grid = function(images=pillow_images, **function_kw)
|
||||
pillow_grid = function(
|
||||
images=pillow_images,
|
||||
gap=gap,
|
||||
annotation=annotation,
|
||||
**kw,
|
||||
)
|
||||
tensor_grid = pillow_to_tensor(pillow_grid)
|
||||
|
||||
return (tensor_grid,)
|
||||
@@ -32,17 +50,17 @@ class BaseImagesGridNode(BaseNode):
|
||||
|
||||
class ImagesGridByColumnsNode(BaseImagesGridNode):
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls) -> t.Dict[str, t.Any]:
|
||||
def INPUT_TYPES(cls) -> dict[str, t.Any]:
|
||||
return cls._create_input_types("max_columns")
|
||||
|
||||
def execute(self, images: Image, **kw) -> tuple[Image]:
|
||||
return self._create_execute(images, create_image_grid_by_columns, kw)
|
||||
def execute(self, **kw) -> tuple[torch.Tensor]:
|
||||
return self._create_execute(create_images_grid_by_columns, **kw)
|
||||
|
||||
|
||||
class ImagesGridByRowsNode(BaseImagesGridNode):
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls) -> t.Dict[str, t.Any]:
|
||||
def INPUT_TYPES(cls) -> dict[str, t.Any]:
|
||||
return cls._create_input_types("max_rows")
|
||||
|
||||
def execute(self, images: Image, **kw) -> tuple[Image]:
|
||||
return self._create_execute(images, create_image_grid_by_rows, kw)
|
||||
def execute(self, **kw) -> tuple[torch.Tensor]:
|
||||
return self._create_execute(create_images_grid_by_rows, **kw)
|
||||
|
||||
@@ -2,14 +2,14 @@ import typing as t
|
||||
|
||||
import torch
|
||||
|
||||
from ..base import BaseNode, Image
|
||||
from ..base import BaseNode
|
||||
|
||||
|
||||
class LatentCombineNode(BaseNode):
|
||||
RETURN_TYPES: t.Tuple[str] = ("LATENT",)
|
||||
RETURN_TYPES: tuple[str] = ("LATENT",)
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls) -> t.Dict[str, t.Any]:
|
||||
def INPUT_TYPES(cls) -> dict[str, t.Any]:
|
||||
return {
|
||||
"required": {
|
||||
"latent_1": ("LATENT",),
|
||||
@@ -19,9 +19,9 @@ class LatentCombineNode(BaseNode):
|
||||
|
||||
def execute(
|
||||
self,
|
||||
latent_1: t.Dict[str, t.Any],
|
||||
latent_2: t.Dict[str, t.Any],
|
||||
) -> t.Tuple[t.Dict[str, t.Any]]:
|
||||
latent_1: dict[str, torch.Tensor],
|
||||
latent_2: dict[str, torch.Tensor],
|
||||
) -> tuple[dict[str, torch.Tensor]]:
|
||||
samples = torch.cat((latent_1["samples"], latent_2["samples"]), 0)
|
||||
|
||||
return ({"samples": samples},)
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
import typing as t
|
||||
|
||||
import torch
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
|
||||
|
||||
def tensor_to_pillow(image):
|
||||
return Image.fromarray(np.clip(255. * image.cpu().numpy().squeeze(), 0, 255).astype(np.uint8))
|
||||
|
||||
|
||||
def pillow_to_tensor(image):
|
||||
return torch.from_numpy(np.array(image).astype(np.float32) / 255.0).unsqueeze(0)
|
||||
|
||||
|
||||
def create_image_grid_by_columns(
|
||||
images: t.List[Image.Image],
|
||||
gap: int,
|
||||
max_columns: int,
|
||||
) -> Image.Image:
|
||||
max_rows = (len(images) + max_columns - 1) // max_columns
|
||||
return create_image_grid(images=images, gap=gap, max_columns=max_columns, max_rows=max_rows)
|
||||
|
||||
|
||||
def create_image_grid_by_rows(
|
||||
images: t.List[Image.Image],
|
||||
gap: int,
|
||||
max_rows: int,
|
||||
) -> Image.Image:
|
||||
max_columns = (len(images) + max_rows - 1) // max_rows
|
||||
return create_image_grid(images=images, gap=gap, max_columns=max_columns, max_rows=max_rows)
|
||||
|
||||
|
||||
def create_image_grid(
|
||||
images: t.List[Image.Image],
|
||||
gap: int,
|
||||
max_columns: int,
|
||||
max_rows: int,
|
||||
) -> Image.Image:
|
||||
size = images[0].size
|
||||
|
||||
width = size[0] * max_columns + (max_columns - 1) * gap
|
||||
height = size[1] * max_rows + (max_rows - 1) * gap
|
||||
|
||||
grid_image = Image.new("RGB", (width, height), color="white")
|
||||
|
||||
for i, image in enumerate(images):
|
||||
x = (i % max_columns) * (size[0] + gap)
|
||||
y = (i // max_columns) * (size[1] + gap)
|
||||
|
||||
grid_image.paste(image, (x, y))
|
||||
|
||||
return grid_image
|
||||
@@ -0,0 +1,6 @@
|
||||
from .images_grid import (
|
||||
create_images_grid_by_columns,
|
||||
create_images_grid_by_rows,
|
||||
Annotation,
|
||||
)
|
||||
from .tensor_convert import tensor_to_pillow, pillow_to_tensor
|
||||
@@ -0,0 +1,195 @@
|
||||
import typing as t
|
||||
from dataclasses import dataclass
|
||||
from contextlib import suppress
|
||||
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
|
||||
@dataclass
|
||||
class Annotation():
|
||||
column_texts: list[str]
|
||||
row_texts: list[str]
|
||||
font: ImageFont.FreeTypeFont
|
||||
|
||||
|
||||
@dataclass
|
||||
class _GridInfo():
|
||||
image: Image.Image
|
||||
gap: int
|
||||
one_image_size: tuple[int, int]
|
||||
|
||||
|
||||
def create_images_grid_by_columns(
|
||||
images: list[Image.Image],
|
||||
gap: int,
|
||||
max_columns: int,
|
||||
annotation: Annotation | None = None,
|
||||
) -> Image.Image:
|
||||
max_rows = (len(images) + max_columns - 1) // max_columns
|
||||
return _create_images_grid(images, gap, max_columns, max_rows, annotation)
|
||||
|
||||
|
||||
def create_images_grid_by_rows(
|
||||
images: list[Image.Image],
|
||||
gap: int,
|
||||
max_rows: int,
|
||||
annotation: Annotation | None = None,
|
||||
) -> Image.Image:
|
||||
max_columns = (len(images) + max_rows - 1) // max_rows
|
||||
return _create_images_grid(images, gap, max_columns, max_rows, annotation)
|
||||
|
||||
|
||||
def _create_images_grid(
|
||||
images: list[Image.Image],
|
||||
gap: int,
|
||||
max_columns: int,
|
||||
max_rows: int,
|
||||
annotation: Annotation | None,
|
||||
) -> Image.Image:
|
||||
size = images[0].size
|
||||
grid_width = size[0] * max_columns + (max_columns - 1) * gap
|
||||
grid_height = size[1] * max_rows + (max_rows - 1) * gap
|
||||
|
||||
grid_image = Image.new("RGB", (grid_width, grid_height), color="white")
|
||||
|
||||
_arrange_images_on_grid(grid_image, images=images, size=size, max_columns=max_columns, gap=gap)
|
||||
|
||||
if annotation is None:
|
||||
return grid_image
|
||||
return _create_grid_annotations(
|
||||
grid_info=_GridInfo(
|
||||
image=grid_image,
|
||||
gap=gap,
|
||||
one_image_size=size,
|
||||
),
|
||||
column_texts=annotation.column_texts,
|
||||
row_texts=annotation.row_texts,
|
||||
font=annotation.font,
|
||||
)
|
||||
|
||||
|
||||
def _arrange_images_on_grid(
|
||||
grid_image: Image.Image,
|
||||
/,
|
||||
images: list[Image.Image],
|
||||
size: tuple[int, int],
|
||||
max_columns: int,
|
||||
gap: int,
|
||||
):
|
||||
for i, image in enumerate(images):
|
||||
if image.size != size:
|
||||
image = image.crop((0, 0, *size))
|
||||
x = (i % max_columns) * (size[0] + gap)
|
||||
y = (i // max_columns) * (size[1] + gap)
|
||||
|
||||
grid_image.paste(image, (x, y))
|
||||
|
||||
|
||||
def _create_grid_annotations(
|
||||
grid_info: _GridInfo,
|
||||
column_texts,
|
||||
row_texts,
|
||||
font: ImageFont.FreeTypeFont,
|
||||
) -> Image.Image:
|
||||
if not column_texts or not row_texts:
|
||||
raise ValueError("Column text or row text is empty")
|
||||
|
||||
grid = grid_info.image
|
||||
margin = font.size // 2
|
||||
left_padding = int(max(map(font.getlength, row_texts))) + 2*margin
|
||||
top_padding = font.size + 2*margin
|
||||
|
||||
image = Image.new(
|
||||
"RGB",
|
||||
(grid.size[0] + left_padding, grid.size[1] + top_padding),
|
||||
color="white",
|
||||
)
|
||||
draw = ImageDraw.Draw(image)
|
||||
draw.font = font # type: ignore
|
||||
|
||||
_paste_image_to_lower_left_corner(image, grid)
|
||||
_draw_column_text(
|
||||
draw=draw,
|
||||
texts=column_texts,
|
||||
grid_info=grid_info,
|
||||
left_padding=left_padding,
|
||||
top_padding=top_padding,
|
||||
)
|
||||
_draw_row_text(
|
||||
draw=draw,
|
||||
texts=row_texts,
|
||||
grid_info=grid_info,
|
||||
left_padding=left_padding,
|
||||
top_padding=top_padding,
|
||||
)
|
||||
|
||||
return image
|
||||
|
||||
|
||||
def _draw_column_text(
|
||||
draw: ImageDraw.ImageDraw,
|
||||
texts: list[str],
|
||||
grid_info: _GridInfo,
|
||||
left_padding: int,
|
||||
top_padding: int,
|
||||
) -> None:
|
||||
i = 0
|
||||
x0 = left_padding
|
||||
y0 = 0
|
||||
x1 = left_padding + grid_info.one_image_size[0]
|
||||
y1 = top_padding
|
||||
while x0 != grid_info.image.size[0] + left_padding + grid_info.gap:
|
||||
i = _draw_text_by_xy((x0, y0, x1, y1), i, draw=draw, texts=texts)
|
||||
x0 += grid_info.one_image_size[0] + grid_info.gap
|
||||
x1 += grid_info.one_image_size[0] + grid_info.gap
|
||||
|
||||
|
||||
def _draw_row_text(
|
||||
draw: ImageDraw.ImageDraw,
|
||||
texts: list[str],
|
||||
grid_info: _GridInfo,
|
||||
left_padding: int,
|
||||
top_padding: int,
|
||||
) -> None:
|
||||
i = 0
|
||||
x0 = 0
|
||||
y0 = top_padding
|
||||
x1 = left_padding
|
||||
y1 = top_padding + grid_info.one_image_size[1]
|
||||
while y0 != grid_info.image.size[1] + top_padding + grid_info.gap:
|
||||
i = _draw_text_by_xy((x0, y0, x1, y1), i, draw=draw, texts=texts)
|
||||
y0 += grid_info.one_image_size[1] + grid_info.gap
|
||||
y1 += grid_info.one_image_size[1] + grid_info.gap
|
||||
|
||||
|
||||
def _draw_text_by_xy(
|
||||
xy: tuple[int, int, int, int],
|
||||
index: int,
|
||||
\
|
||||
draw: ImageDraw.ImageDraw,
|
||||
texts: list[str],
|
||||
) -> int:
|
||||
with suppress(IndexError):
|
||||
_draw_center_text(draw, xy, texts[index])
|
||||
return index + 1
|
||||
|
||||
|
||||
def _draw_center_text(
|
||||
draw: ImageDraw.ImageDraw,
|
||||
xy: tuple[int, int, int, int],
|
||||
text: str,
|
||||
fill: t.Any = "black",
|
||||
) -> None:
|
||||
_, _, *text_size = draw.textbbox((0, 0), text)
|
||||
draw.text(
|
||||
(
|
||||
(xy[2] - text_size[0] + xy[0]) / 2,
|
||||
(xy[3] - text_size[1] + xy[1]) / 2,
|
||||
),
|
||||
text,
|
||||
fill=fill,
|
||||
)
|
||||
|
||||
|
||||
def _paste_image_to_lower_left_corner(base: Image.Image, image: Image.Image) -> None:
|
||||
base.paste(image, (base.size[0] - image.size[0], base.size[1] - image.size[1]))
|
||||
@@ -0,0 +1,13 @@
|
||||
import typing as t
|
||||
|
||||
import torch
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
|
||||
|
||||
def tensor_to_pillow(image: t.Any) -> Image.Image:
|
||||
return Image.fromarray(np.clip(255. * image.cpu().numpy().squeeze(), 0, 255).astype(np.uint8))
|
||||
|
||||
|
||||
def pillow_to_tensor(image: Image.Image) -> t.Any:
|
||||
return torch.from_numpy(np.array(image).astype(np.float32) / 255.0).unsqueeze(0)
|
||||
Binary file not shown.
+645
-588
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 420 KiB After Width: | Height: | Size: 309 KiB |
+430
-86
@@ -1,19 +1,21 @@
|
||||
{
|
||||
"last_node_id": 56,
|
||||
"last_link_id": 97,
|
||||
"last_node_id": 70,
|
||||
"last_link_id": 121,
|
||||
"nodes": [
|
||||
{
|
||||
"id": 41,
|
||||
"id": 68,
|
||||
"type": "LoadImage",
|
||||
"pos": [
|
||||
69,
|
||||
307
|
||||
-30,
|
||||
70
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 102
|
||||
},
|
||||
"flags": {},
|
||||
"flags": {
|
||||
"collapsed": true
|
||||
},
|
||||
"order": 0,
|
||||
"mode": 0,
|
||||
"outputs": [
|
||||
@@ -21,7 +23,7 @@
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
90
|
||||
119
|
||||
],
|
||||
"slot_index": 0
|
||||
},
|
||||
@@ -35,22 +37,24 @@
|
||||
"Node name for S&R": "LoadImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ComfyUI_00171_.png",
|
||||
"394102.png",
|
||||
"image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 42,
|
||||
"id": 41,
|
||||
"type": "LoadImage",
|
||||
"pos": [
|
||||
69,
|
||||
449
|
||||
-30,
|
||||
210
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 102
|
||||
},
|
||||
"flags": {},
|
||||
"flags": {
|
||||
"collapsed": true
|
||||
},
|
||||
"order": 1,
|
||||
"mode": 0,
|
||||
"outputs": [
|
||||
@@ -58,7 +62,7 @@
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
91
|
||||
120
|
||||
],
|
||||
"slot_index": 0
|
||||
},
|
||||
@@ -72,22 +76,24 @@
|
||||
"Node name for S&R": "LoadImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ComfyUI_00153_.png",
|
||||
"394102.png",
|
||||
"image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 43,
|
||||
"id": 42,
|
||||
"type": "LoadImage",
|
||||
"pos": [
|
||||
68,
|
||||
592
|
||||
-30,
|
||||
350
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 102
|
||||
},
|
||||
"flags": {},
|
||||
"flags": {
|
||||
"collapsed": true
|
||||
},
|
||||
"order": 2,
|
||||
"mode": 0,
|
||||
"outputs": [
|
||||
@@ -95,7 +101,7 @@
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
94
|
||||
112
|
||||
],
|
||||
"slot_index": 0
|
||||
},
|
||||
@@ -109,12 +115,171 @@
|
||||
"Node name for S&R": "LoadImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"ComfyUI_00116_.png",
|
||||
"394102.png",
|
||||
"image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 54,
|
||||
"id": 43,
|
||||
"type": "LoadImage",
|
||||
"pos": [
|
||||
-30,
|
||||
490
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 102
|
||||
},
|
||||
"flags": {
|
||||
"collapsed": true
|
||||
},
|
||||
"order": 3,
|
||||
"mode": 0,
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
106
|
||||
],
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "MASK",
|
||||
"type": "MASK",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "LoadImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"394102.png",
|
||||
"image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"type": "LoadImage",
|
||||
"pos": [
|
||||
-30,
|
||||
630
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 102
|
||||
},
|
||||
"flags": {
|
||||
"collapsed": true
|
||||
},
|
||||
"order": 4,
|
||||
"mode": 0,
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
105
|
||||
],
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "MASK",
|
||||
"type": "MASK",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "LoadImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"394102.png",
|
||||
"image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 63,
|
||||
"type": "LoadImage",
|
||||
"pos": [
|
||||
-30,
|
||||
770
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 102
|
||||
},
|
||||
"flags": {
|
||||
"collapsed": true
|
||||
},
|
||||
"order": 5,
|
||||
"mode": 0,
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
104
|
||||
],
|
||||
"slot_index": 0
|
||||
},
|
||||
{
|
||||
"name": "MASK",
|
||||
"type": "MASK",
|
||||
"links": null
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "LoadImage"
|
||||
},
|
||||
"widgets_values": [
|
||||
"394102.png",
|
||||
"image"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 65,
|
||||
"type": "ImageCombine",
|
||||
"pos": [
|
||||
460,
|
||||
430
|
||||
],
|
||||
"size": {
|
||||
"0": 210,
|
||||
"1": 46
|
||||
},
|
||||
"flags": {},
|
||||
"order": 9,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "image_1",
|
||||
"type": "IMAGE",
|
||||
"link": 113
|
||||
},
|
||||
{
|
||||
"name": "image_2",
|
||||
"type": "IMAGE",
|
||||
"link": 106
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
114
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "ImageCombine"
|
||||
},
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
},
|
||||
{
|
||||
"id": 67,
|
||||
"type": "ImageCombine",
|
||||
"pos": [
|
||||
460,
|
||||
@@ -125,18 +290,18 @@
|
||||
"1": 46
|
||||
},
|
||||
"flags": {},
|
||||
"order": 3,
|
||||
"order": 8,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "image_1",
|
||||
"type": "IMAGE",
|
||||
"link": 90
|
||||
"link": 118
|
||||
},
|
||||
{
|
||||
"name": "image_2",
|
||||
"type": "IMAGE",
|
||||
"link": 91
|
||||
"link": 112
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
@@ -144,7 +309,49 @@
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
93
|
||||
113
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "ImageCombine"
|
||||
},
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
},
|
||||
{
|
||||
"id": 69,
|
||||
"type": "ImageCombine",
|
||||
"pos": [
|
||||
460,
|
||||
270
|
||||
],
|
||||
"size": {
|
||||
"0": 210,
|
||||
"1": 46
|
||||
},
|
||||
"flags": {},
|
||||
"order": 7,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "image_1",
|
||||
"type": "IMAGE",
|
||||
"link": 119
|
||||
},
|
||||
{
|
||||
"name": "image_2",
|
||||
"type": "IMAGE",
|
||||
"link": 120
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
118
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
@@ -160,25 +367,25 @@
|
||||
"type": "ImageCombine",
|
||||
"pos": [
|
||||
460,
|
||||
440
|
||||
510
|
||||
],
|
||||
"size": {
|
||||
"0": 210,
|
||||
"1": 46
|
||||
},
|
||||
"flags": {},
|
||||
"order": 4,
|
||||
"order": 10,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "image_1",
|
||||
"type": "IMAGE",
|
||||
"link": 93
|
||||
"link": 114
|
||||
},
|
||||
{
|
||||
"name": "image_2",
|
||||
"type": "IMAGE",
|
||||
"link": 94
|
||||
"link": 105
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
@@ -186,7 +393,7 @@
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
95
|
||||
110
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
@@ -198,50 +405,29 @@
|
||||
"bgcolor": "#533"
|
||||
},
|
||||
{
|
||||
"id": 56,
|
||||
"type": "PreviewImage",
|
||||
"id": 54,
|
||||
"type": "ImageCombine",
|
||||
"pos": [
|
||||
1059,
|
||||
350
|
||||
],
|
||||
"size": [
|
||||
428.921914672851,
|
||||
507.1954368591306
|
||||
],
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"link": 97
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "PreviewImage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 53,
|
||||
"type": "ImagesGridByColumns",
|
||||
"pos": [
|
||||
700,
|
||||
350
|
||||
460,
|
||||
590
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 82
|
||||
"0": 210,
|
||||
"1": 46
|
||||
},
|
||||
"flags": {},
|
||||
"order": 5,
|
||||
"order": 11,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "images",
|
||||
"name": "image_1",
|
||||
"type": "IMAGE",
|
||||
"link": 95,
|
||||
"slot_index": 0
|
||||
"link": 110
|
||||
},
|
||||
{
|
||||
"name": "image_2",
|
||||
"type": "IMAGE",
|
||||
"link": 104
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
@@ -249,68 +435,226 @@
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
97
|
||||
115
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "ImagesGridByColumns"
|
||||
"Node name for S&R": "ImageCombine"
|
||||
},
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"type": "GridAnnotation",
|
||||
"pos": [
|
||||
350,
|
||||
690
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 106
|
||||
},
|
||||
"flags": {},
|
||||
"order": 6,
|
||||
"mode": 0,
|
||||
"outputs": [
|
||||
{
|
||||
"name": "GRID_ANNOTATION",
|
||||
"type": "GRID_ANNOTATION",
|
||||
"links": [
|
||||
102
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "GridAnnotation"
|
||||
},
|
||||
"widgets_values": [
|
||||
5,
|
||||
2
|
||||
"Column 1; Column 2",
|
||||
"My favorite; Others;Meow",
|
||||
400
|
||||
],
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"type": "ImagesGridByRows",
|
||||
"pos": [
|
||||
740,
|
||||
380
|
||||
],
|
||||
"size": {
|
||||
"0": 315,
|
||||
"1": 102
|
||||
},
|
||||
"flags": {},
|
||||
"order": 12,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"link": 115
|
||||
},
|
||||
{
|
||||
"name": "annotation",
|
||||
"type": "GRID_ANNOTATION",
|
||||
"link": 102
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "IMAGE",
|
||||
"type": "IMAGE",
|
||||
"links": [
|
||||
121
|
||||
],
|
||||
"slot_index": 0
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "ImagesGridByRows"
|
||||
},
|
||||
"widgets_values": [
|
||||
30,
|
||||
3
|
||||
],
|
||||
"color": "#322",
|
||||
"bgcolor": "#533"
|
||||
},
|
||||
{
|
||||
"id": 70,
|
||||
"type": "PreviewImage",
|
||||
"pos": [
|
||||
1080,
|
||||
380
|
||||
],
|
||||
"size": {
|
||||
"0": 353,
|
||||
"1": 510
|
||||
},
|
||||
"flags": {},
|
||||
"order": 13,
|
||||
"mode": 0,
|
||||
"inputs": [
|
||||
{
|
||||
"name": "images",
|
||||
"type": "IMAGE",
|
||||
"link": 121
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"Node name for S&R": "PreviewImage"
|
||||
}
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
[
|
||||
90,
|
||||
41,
|
||||
102,
|
||||
60,
|
||||
0,
|
||||
54,
|
||||
0,
|
||||
"IMAGE"
|
||||
61,
|
||||
1,
|
||||
"GRID_ANNOTATION"
|
||||
],
|
||||
[
|
||||
91,
|
||||
42,
|
||||
104,
|
||||
63,
|
||||
0,
|
||||
54,
|
||||
1,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
93,
|
||||
54,
|
||||
105,
|
||||
62,
|
||||
0,
|
||||
55,
|
||||
0,
|
||||
1,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
94,
|
||||
106,
|
||||
43,
|
||||
0,
|
||||
55,
|
||||
65,
|
||||
1,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
95,
|
||||
110,
|
||||
55,
|
||||
0,
|
||||
53,
|
||||
54,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
97,
|
||||
53,
|
||||
112,
|
||||
42,
|
||||
0,
|
||||
56,
|
||||
67,
|
||||
1,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
113,
|
||||
67,
|
||||
0,
|
||||
65,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
114,
|
||||
65,
|
||||
0,
|
||||
55,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
115,
|
||||
54,
|
||||
0,
|
||||
61,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
118,
|
||||
69,
|
||||
0,
|
||||
67,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
119,
|
||||
68,
|
||||
0,
|
||||
69,
|
||||
0,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
120,
|
||||
41,
|
||||
0,
|
||||
69,
|
||||
1,
|
||||
"IMAGE"
|
||||
],
|
||||
[
|
||||
121,
|
||||
61,
|
||||
0,
|
||||
70,
|
||||
0,
|
||||
"IMAGE"
|
||||
]
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 273 KiB After Width: | Height: | Size: 96 KiB |
Reference in New Issue
Block a user