BREAKING CHANGE: Node categories now use emoji-based organization Add 6 new xyz-helper nodes adapted from comfyui-essentials-nodes: - FluxSamplerParams: FLUX-optimized parameter generator with batch support - LoRAFolderBatch: Batch process multiple LoRAs from folders - PlotParameters: Visualize parameter effects with graphs - SamplerSelectHelper: Intelligent sampler selection with recommendations - SchedulerSelectHelper: Optimal scheduler selection for samplers - TextEncodeSamplerParams: Combined text encoding and parameter management Changes: - Port and enhance nodes from comfyui-essentials (now in maintenance mode) - Add comprehensive documentation with attribution to original author (cubiq) - Create example workflows for xyz-helpers tools - Update all node categories to use emoji-based organization - Fix all unit tests to pass with new category system - Update README with xyz-helpers section and attribution Attribution: xyz-helpers adapted from github.com/cubiq/ComfyUI_essentials All tests passing (318 pass, 2 skip)
49 lines
1.2 KiB
Python
49 lines
1.2 KiB
Python
"""Display Text node implementation."""
|
|
|
|
from ...base import ComfyAssetsBaseNode
|
|
|
|
|
|
class DisplayTextNode(ComfyAssetsBaseNode):
|
|
"""Displays text in the ComfyUI interface with copy-to-clipboard functionality."""
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
"""Define input types for the node."""
|
|
return {
|
|
"required": {
|
|
"text": ("STRING", {"forceInput": True}),
|
|
},
|
|
}
|
|
|
|
RETURN_TYPES = ("STRING",)
|
|
RETURN_NAMES = ("text",)
|
|
OUTPUT_NODE = True
|
|
FUNCTION = "display_text"
|
|
CATEGORY = "ComfyAssets/👁️ Display"
|
|
|
|
DESCRIPTION = """
|
|
Displays text in the UI with a copy-to-clipboard feature.
|
|
|
|
Features:
|
|
- Shows text content in a readable format
|
|
- Copy button appears on hover
|
|
- Passes text through for chaining
|
|
"""
|
|
|
|
def display_text(self, text):
|
|
"""Display the text and pass it through.
|
|
|
|
Args:
|
|
text: Input text to display
|
|
|
|
Returns:
|
|
Tuple containing the text
|
|
"""
|
|
# The actual display happens in the frontend
|
|
# We just pass the text through
|
|
return {"ui": {"text": [text]}, "result": (text,)}
|
|
|
|
|
|
# Node display name
|
|
NODE_DISPLAY_NAME = "Display Text"
|