From 2eea92abdf87b7e2789289ac746603e49d1fc37e Mon Sep 17 00:00:00 2001 From: Will Miao Date: Thu, 29 Jan 2026 09:07:22 +0800 Subject: [PATCH] fix: allow STRING input connections for AUTOCOMPLETE_TEXT_PROMPT widgets Use union type "AUTOCOMPLETE_TEXT_PROMPT,STRING" to enable input mode compatibility with STRING outputs while preserving autocomplete widget functionality via widgetType option. Fixes issue where text inputs could not receive connections from STRING-type outputs after changing from built-in STRING to custom AUTOCOMPLETE_TEXT_PROMPT type. Affected nodes: - Prompt (LoraManager) - Text (LoraManager) --- py/nodes/prompt.py | 3 ++- py/nodes/text.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/py/nodes/prompt.py b/py/nodes/prompt.py index 829df0d1..43dfa88d 100644 --- a/py/nodes/prompt.py +++ b/py/nodes/prompt.py @@ -15,8 +15,9 @@ class PromptLM: return { "required": { "text": ( - "AUTOCOMPLETE_TEXT_PROMPT", + "AUTOCOMPLETE_TEXT_PROMPT,STRING", { + "widgetType": "AUTOCOMPLETE_TEXT_PROMPT", "placeholder": "Enter prompt... /char, /artist for quick tag search", "tooltip": "The text to be encoded.", }, diff --git a/py/nodes/text.py b/py/nodes/text.py index 8e3dcd60..5131e15b 100644 --- a/py/nodes/text.py +++ b/py/nodes/text.py @@ -12,8 +12,9 @@ class TextLM: return { "required": { "text": ( - "AUTOCOMPLETE_TEXT_PROMPT", + "AUTOCOMPLETE_TEXT_PROMPT,STRING", { + "widgetType": "AUTOCOMPLETE_TEXT_PROMPT", "placeholder": "Enter text... /char, /artist for quick tag search", "tooltip": "The text output.", },