From fbbaae72fd3c6b8ff9d2ef31c1e5dcaff6674df3 Mon Sep 17 00:00:00 2001 From: SquirrelRat <37273964+SquirrelRat@users.noreply.github.com> Date: Thu, 23 Oct 2025 14:44:28 -0500 Subject: [PATCH] 1.03 Fixed string outputs list to omit empty fields and added negative prompt --- multi_prompt_node.py | 23 ++++++++++++++--------- pyproject.toml | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/multi_prompt_node.py b/multi_prompt_node.py index 828b353..7c9622d 100644 --- a/multi_prompt_node.py +++ b/multi_prompt_node.py @@ -13,25 +13,27 @@ class MultiStringPrompts: "multi_prompt_3": ("STRING", {"multiline": True, "default": ""}), "multi_prompt_4": ("STRING", {"multiline": True, "default": ""}), "multi_prompt_5": ("STRING", {"multiline": True, "default": ""}), + "negative_prompt": ("STRING", {"multiline": True, "default": ""}), } } - RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING",) + RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING", "STRING", "*",) RETURN_NAMES = ( "prompt_1", "prompt_2", "prompt_3", "prompt_4", "prompt_5", + "negative_prompt", "prompt_list", ) - OUTPUT_IS_LIST = (False, False, False, False, False, True,) + OUTPUT_IS_LIST = (False, False, False, False, False, False, False,) FUNCTION = "process_prompts" CATEGORY = "MultiString Prompts" def process_prompts(self, prefix, suffix, enable_prefix, enable_suffix, multi_prompt_1, multi_prompt_2, multi_prompt_3, - multi_prompt_4, multi_prompt_5): + multi_prompt_4, multi_prompt_5, negative_prompt): def _process(prompt_text, prefix, suffix, enable_prefix, enable_suffix): @@ -65,16 +67,19 @@ class MultiStringPrompts: multi_prompt_5 ] - prompt_list_out = [ + processed_prompts = [ _process(p, prefix, suffix, enable_prefix, enable_suffix) for p in prompts_in ] + neg_prompt_out = _process(negative_prompt, prefix, suffix, enable_prefix, enable_suffix) + prompt_list_out = [p for p in processed_prompts if p and p.strip()] return ( - prompt_list_out[0], - prompt_list_out[1], - prompt_list_out[2], - prompt_list_out[3], - prompt_list_out[4], + processed_prompts[0], + processed_prompts[1], + processed_prompts[2], + processed_prompts[3], + processed_prompts[4], + neg_prompt_out, prompt_list_out, ) diff --git a/pyproject.toml b/pyproject.toml index 9ac3ff5..3ad44af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "multistring-prompts" description = "This is a simple but powerful custom node for ComfyUI, designed to help you manage and sequence multiple prompts from a single, clean interface.\nIt's ideal for workflows like sequential video generation where you need to feed a series of different prompts into your model." -version = "1.0.2" +version = "1.0.3" license = {file = "LICENSE"} # classifiers = [ # # For OS-independent nodes (works on all operating systems)