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
28 lines
536 B
Python
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,)
|