From 349f796c10e6212520d574d91c29d8063debf8f5 Mon Sep 17 00:00:00 2001 From: Dreaming Computers Date: Sun, 11 Jan 2026 13:12:45 +0700 Subject: [PATCH] proper output of prompt lists comfy way --- nodes.py | 18 +++++++++++++++++- web/docs/kie_prompt_grid.md | 3 +++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index 59baced..59d6ed1 100644 --- a/nodes.py +++ b/nodes.py @@ -666,6 +666,7 @@ Outputs: "STRING", "INT", "STRING", + "STRING", ) RETURN_NAMES = ( "prompt 1", @@ -679,6 +680,21 @@ Outputs: "prompt 9", "count", "prompts_list", + "prompts_list_seq", + ) + OUTPUT_IS_LIST = ( + False, + False, + False, + False, + False, + False, + False, + False, + False, + False, + False, + True, ) FUNCTION = "parse" CATEGORY = "kie/helpers" @@ -715,7 +731,7 @@ Outputs: padded = prompts[:9] + [""] * (9 - len(prompts)) count = len(prompts) - return (*padded, count, prompts) + return (*padded, count, prompts, prompts) NODE_CLASS_MAPPINGS = { diff --git a/web/docs/kie_prompt_grid.md b/web/docs/kie_prompt_grid.md index c8559d2..5a320e2 100644 --- a/web/docs/kie_prompt_grid.md +++ b/web/docs/kie_prompt_grid.md @@ -57,6 +57,9 @@ Object format (underscore keys): - **prompts_list** Raw list of prompts for future automation or batching (not stringified). +- **prompts_list_seq** + Prompts as a ComfyUI list output (OUTPUT_IS_LIST) for sequential downstream processing. + --- ## Grid wiring tips