mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-22 13:42:12 -03:00
Introduce a new TextLM node to the Lora Manager extension, providing a simple text input with autocomplete functionality for tags and styles. The node is integrated into the module's import system and node class mappings, enabling users to utilize autocomplete features for efficient prompt creation.
32 lines
847 B
Python
32 lines
847 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",
|
|
{
|
|
"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,) |