From 592bece6a44d785dd10d32885682fa68361ff0b6 Mon Sep 17 00:00:00 2001 From: WAS Date: Sun, 5 Nov 2023 10:09:11 -0800 Subject: [PATCH] Update nodes.py --- nodes.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/nodes.py b/nodes.py index ae85e8c..beb47e0 100644 --- a/nodes.py +++ b/nodes.py @@ -106,3 +106,31 @@ class CheckpointListLiteral: def parse_literal(self, literal): split = list(filter(None, literal.split("\n"))) return (split,) + +class LoraListLiteral: + def __init__(self): + pass + + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "literal": ("STRING", { + "multiline": True, + "default": "\n".join(folder_paths.get_filename_list("loras")) + }), + }, + } + + RETURN_TYPES = (ANY,) + RETURN_NAMES = ("Selected Loras",) + OUTPUT_IS_LIST = (True,) + FUNCTION = "parse_literal" + + # OUTPUT_NODE = False + + CATEGORY = "List Stuff" + + def parse_literal(self, literal): + split = list(filter(None, literal.split("\n"))) + return (split,)