From e5eb4a42db94843f38ee340b2e61ddcb2dab0a09 Mon Sep 17 00:00:00 2001 From: Michael Poutre Date: Mon, 11 Sep 2023 18:38:28 -0700 Subject: [PATCH] fix: Use ANY for CheckpointListLiteral --- nodes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index f822994..ae85e8c 100644 --- a/nodes.py +++ b/nodes.py @@ -1,6 +1,13 @@ import folder_paths +# Hack: string type that is always equal in not equal comparisons +class AnyType(str): + def __ne__(self, __value: object) -> bool: + return False + +# Our any instance wants to be a wildcard string +ANY = AnyType("*") class IntLiteral: def __init__(self, ): pass @@ -87,7 +94,7 @@ class CheckpointListLiteral: }, } - RETURN_TYPES = (folder_paths.get_filename_list("checkpoints"),) + RETURN_TYPES = (ANY,) RETURN_NAMES = ("Selected Checkpoints",) OUTPUT_IS_LIST = (True,) FUNCTION = "parse_literal"