Add native ComfyUI list output converter

This commit is contained in:
Hopping Mad Games
2026-08-27 08:21:36 -06:00
parent 36a6124ba9
commit e5cccb21a3
6 changed files with 74 additions and 5 deletions
+31
View File
@@ -6,6 +6,37 @@ from collections.abc import Mapping
from copy import deepcopy
class AnyType(str):
"""ComfyUI wildcard socket type for a list whose item type is not fixed."""
def __ne__(self, other):
return False
ANY_TYPE = AnyType("*")
class ETKListToComfyList:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"items": ("LIST", {"default": []}),
}
}
RETURN_TYPES = (ANY_TYPE,)
RETURN_NAMES = ("items",)
OUTPUT_IS_LIST = (True,)
FUNCTION = "convert"
CATEGORY = "ETK/List"
def convert(self, items):
if not isinstance(items, list):
raise TypeError(f"items must be a LIST, got {type(items).__name__}")
return (items,)
class ImageFromListIdx:
@classmethod
def INPUT_TYPES(cls):