refactor: restore two-port concat backend schema

This commit is contained in:
Gin3601
2026-05-26 11:46:13 +08:00
parent 6926861bc3
commit d9afc48ee5
3 changed files with 15 additions and 8 deletions
+10 -3
View File
@@ -16,11 +16,18 @@ TARGET_CHOICES = ["A", "B"]
POSITION_CHOICES = ["top", "bottom", "left", "right"]
RESIZE_MODE_CHOICES = ["keep_proportion", "stretch", "none"]
ALIGN_CHOICES = ["start", "center", "end"]
INPUT_DATA_CHOICES = "IMAGE,MASK"
PORT_A_NAME = "image/mask_A"
PORT_B_NAME = "image/mask_B"
class AnyType(str):
def __ne__(self, other): # pragma: no cover - exercised by ComfyUI type checks
return False
ANY_TYPE = AnyType("*")
def _require_torch():
if torch is None or torch_nn_functional is None:
raise RuntimeError("[LLS] torch is required for LLS Concat By Target.") from _TORCH_ERR
@@ -452,8 +459,8 @@ class LLSConcatByTarget:
"allow_batch_broadcast": ("BOOLEAN", {"default": True}),
},
"optional": {
PORT_A_NAME: (INPUT_DATA_CHOICES,),
PORT_B_NAME: (INPUT_DATA_CHOICES,),
"a": (ANY_TYPE,),
"b": (ANY_TYPE,),
},
}