mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-22 05:32:12 -03:00
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)
33 lines
920 B
Python
33 lines
920 B
Python
class TextLM:
|
|
"""A simple text node with autocomplete support."""
|
|
|
|
NAME = "Text (LoraManager)"
|
|
CATEGORY = "Lora Manager/utils"
|
|
DESCRIPTION = (
|
|
"A simple text input node with autocomplete support for tags and styles."
|
|
)
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {
|
|
"required": {
|
|
"text": (
|
|
"AUTOCOMPLETE_TEXT_PROMPT,STRING",
|
|
{
|
|
"widgetType": "AUTOCOMPLETE_TEXT_PROMPT",
|
|
"placeholder": "Enter text... /char, /artist for quick tag search",
|
|
"tooltip": "The text output.",
|
|
},
|
|
),
|
|
},
|
|
}
|
|
|
|
RETURN_TYPES = ("STRING",)
|
|
RETURN_NAMES = ("STRING",)
|
|
OUTPUT_TOOLTIPS = (
|
|
"The text output.",
|
|
)
|
|
FUNCTION = "process"
|
|
|
|
def process(self, text: str):
|
|
return (text,) |