Merge branch 'WASasquatch:main' into fix_text_load_index_store_and_get
This commit is contained in:
+33
-8
@@ -9503,7 +9503,7 @@ class WAS_Text_Multiline:
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"text": ("STRING", {"default": '', "multiline": True, "dynamicPrompts": False}),
|
||||
"text": ("STRING", {"default": '', "multiline": True, "dynamicPrompts": True}),
|
||||
}
|
||||
}
|
||||
RETURN_TYPES = (TEXT_TYPE,)
|
||||
@@ -9527,6 +9527,29 @@ class WAS_Text_Multiline:
|
||||
return (new_text, )
|
||||
|
||||
|
||||
class WAS_Text_Multiline_Raw:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"text": ("STRING", {"default": '', "multiline": True, "dynamicPrompts": False}),
|
||||
}
|
||||
}
|
||||
RETURN_TYPES = (TEXT_TYPE,)
|
||||
FUNCTION = "text_multiline"
|
||||
|
||||
CATEGORY = "WAS Suite/Text"
|
||||
|
||||
def text_multiline(self, text):
|
||||
tokens = TextTokens()
|
||||
new_text = tokens.parseTokens(text)
|
||||
|
||||
return (new_text, )
|
||||
|
||||
|
||||
# Text List Concatenate Node
|
||||
|
||||
class WAS_Text_List_Concatenate:
|
||||
@@ -10093,23 +10116,23 @@ class WAS_Text_Concatenate:
|
||||
"clean_whitespace": (["true", "false"],),
|
||||
},
|
||||
"optional": {
|
||||
"text_a": (TEXT_TYPE, {"forceInput": (True if TEXT_TYPE == 'STRING' else False)}),
|
||||
"text_b": (TEXT_TYPE, {"forceInput": (True if TEXT_TYPE == 'STRING' else False)}),
|
||||
"text_c": (TEXT_TYPE, {"forceInput": (True if TEXT_TYPE == 'STRING' else False)}),
|
||||
"text_d": (TEXT_TYPE, {"forceInput": (True if TEXT_TYPE == 'STRING' else False)}),
|
||||
"text_a": ("STRING", {"forceInput": True}),
|
||||
"text_b": ("STRING", {"forceInput": True}),
|
||||
"text_c": ("STRING", {"forceInput": True}),
|
||||
"text_d": ("STRING", {"forceInput": True}),
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TYPES = (TEXT_TYPE,)
|
||||
RETURN_TYPES = ("STRING",)
|
||||
FUNCTION = "text_concatenate"
|
||||
|
||||
CATEGORY = "WAS Suite/Text"
|
||||
|
||||
def text_concatenate(self, delimiter, clean_whitespace, **kwargs):
|
||||
text_inputs: list[str] = []
|
||||
text_inputs = []
|
||||
|
||||
# Handle special case where delimiter is "\n" (literal newline).
|
||||
if delimiter == "\\n":
|
||||
if delimiter in ("\n", "\\n"):
|
||||
delimiter = "\n"
|
||||
|
||||
# Iterate over the received inputs in sorted order.
|
||||
@@ -10135,6 +10158,7 @@ class WAS_Text_Concatenate:
|
||||
return (merged_text,)
|
||||
|
||||
|
||||
|
||||
# Text Find
|
||||
|
||||
|
||||
@@ -13974,6 +13998,7 @@ NODE_CLASS_MAPPINGS = {
|
||||
"Text List to Text": WAS_Text_List_to_Text,
|
||||
"Text Load Line From File": WAS_Text_Load_Line_From_File,
|
||||
"Text Multiline": WAS_Text_Multiline,
|
||||
"Text Multiline (Code Compatible)": WAS_Text_Multiline_Raw,
|
||||
"Text Parse A1111 Embeddings": WAS_Text_Parse_Embeddings_By_Name,
|
||||
"Text Parse Noodle Soup Prompts": WAS_Text_Parse_NSP,
|
||||
"Text Parse Tokens": WAS_Text_Parse_Tokens,
|
||||
|
||||
Reference in New Issue
Block a user