Files
LEv145-images-grid-comfy-pl…/src/nodes/image_combine.py
T
LEv145 1bc3f221b7 v 2.1.5
Add `GridAnnotation` node
Remove old debug `print`s
Update typing to python3.8
Add support Annotations for `BaseImagesGridNode`
Improved and simplified code
Remove `grid_annotations` util
Add support annotation for `create_images_grid` util
Add static path and font
2023-04-09 02:12:07 +02:00

28 lines
536 B
Python

import typing as t
import torch
from ..base import BaseNode, Image
class ImageCombineNode(BaseNode):
RETURN_TYPES: tuple[str] = ("IMAGE",)
@classmethod
def INPUT_TYPES(cls) -> dict[str, t.Any]:
return {
"required": {
"image_1": ("IMAGE",),
"image_2": ("IMAGE",),
},
}
def execute(
self,
image_1: Image,
image_2: Image,
) -> tuple[Image]:
result = torch.cat((image_1, image_2), 0)
return (result,)