Files
jammyfu-ComfyUI_PaintingCod…/multiline_text_input.py
T
jammyfu 55f99320a1 Add TextCombiner and MultilineTextInput classes; update __init__.py for new nodes
This commit introduces two new classes: TextCombiner and MultilineTextInput, enhancing the text processing capabilities of the application. The __init__.py file has been updated to include these new nodes in the NODE_CLASS_MAPPINGS and NODE_DISPLAY_NAME_MAPPINGS. Additionally, the requirements.txt file has been cleaned up by removing the outdated Gradio dependency
2024-12-25 18:53:35 +08:00

27 lines
612 B
Python

# -*- coding: utf-8 -*-
# Filename: multiline_text_input.py
# Developer: jammyfu
# Category: 🎨Painting👓Coder/📝Text
class MultilineTextInput:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"text": ("STRING", {"multiline": True}),
},
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("text",)
FUNCTION = "get_text"
CATEGORY = "🎨Painting👓Coder/📝Text"
def get_text(self, text):
return (text,)
# 添加到 ComfyUI 节点注册
NODE_CLASS_MAPPINGS = {
"MultilineTextInput": MultilineTextInput,
}