From 38c206c59bffcd235566d61a2992659f61a2e84d Mon Sep 17 00:00:00 2001 From: Vito Sansevero Date: Thu, 5 Jun 2025 13:14:32 -0700 Subject: [PATCH] feat(prompt_manager): add string return type and output --- prompt_manager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/prompt_manager.py b/prompt_manager.py index f54848c..192a76d 100644 --- a/prompt_manager.py +++ b/prompt_manager.py @@ -102,9 +102,10 @@ class PromptManager(ComfyNodeABC): } } - RETURN_TYPES = (IO.CONDITIONING,) + RETURN_TYPES = (IO.CONDITIONING, IO.STRING) OUTPUT_TOOLTIPS = ( "A conditioning containing the embedded text used to guide the diffusion model.", + "The final combined text string (with prepend/append applied) that was encoded." ) FUNCTION = "encode" CATEGORY = "PromptManager/Text" @@ -137,7 +138,7 @@ class PromptManager(ComfyNodeABC): append_text: Text to append to the main prompt Returns: - Tuple containing the conditioning for the diffusion model + Tuple containing the conditioning for the diffusion model and the final text string Raises: RuntimeError: If clip input is invalid @@ -213,7 +214,7 @@ class PromptManager(ComfyNodeABC): conditioning = clip.encode_from_tokens_scheduled(tokens) self.logger.debug("CLIP encoding completed successfully") - return (conditioning,) + return (conditioning, encoding_text) def _save_prompt_to_database( self,