refactor: 删除Show_UTK节点 - 移除show_nodes.py文件 - 清理__init__.py中的show节点引用 - 更新README.md文档

This commit is contained in:
Cyber Dick Lang
2025-07-25 15:53:36 +08:00
parent c4580b252e
commit 9ae90af703
3 changed files with 0 additions and 68 deletions
-3
View File
@@ -84,9 +84,6 @@ tqdm
### 🛠️ 工具节点
#### 显示与预览
- **Show_UTK**:通用显示节点,支持所有数据类型预览
#### 文本处理
- **TextboxNode_UTK**:多行文本输入框
- **TextConcatenate_UTK**:文本拼接,支持自定义分隔符
-9
View File
@@ -325,10 +325,6 @@ try:
NODE_CLASS_MAPPINGS as MATH_EXPRESSION_MAPPINGS
from .nodes.tools.math_expression_node import \
NODE_DISPLAY_NAME_MAPPINGS as MATH_EXPRESSION_DISPLAY_MAPPINGS
from .nodes.tools.show_nodes import \
NODE_CLASS_MAPPINGS as SHOW_NODES_MAPPINGS
from .nodes.tools.show_nodes import \
NODE_DISPLAY_NAME_MAPPINGS as SHOW_NODES_DISPLAY_MAPPINGS
from .nodes.tools.text_concatenate_node import \
NODE_CLASS_MAPPINGS as TEXT_CONCATENATE_MAPPINGS
from .nodes.tools.text_concatenate_node import \
@@ -342,8 +338,6 @@ try:
except ImportError as e:
print(f"导入错误: {e}")
# 如果模块化导入失败,使用空字典
SHOW_NODES_MAPPINGS = {}
SHOW_NODES_DISPLAY_MAPPINGS = {}
AUDIO_CROP_MAPPINGS = {}
AUDIO_CROP_DISPLAY_MAPPINGS = {}
MASK_OPERATIONS_MAPPINGS = {}
@@ -549,7 +543,6 @@ NODE_CLASS_MAPPINGS.update(CHECK_MASK_MAPPINGS)
NODE_CLASS_MAPPINGS.update(PURGE_VRAM_MAPPINGS)
NODE_CLASS_MAPPINGS.update(CROP_MASK_MAPPINGS)
NODE_CLASS_MAPPINGS.update(RESTORE_CROP_MAPPINGS)
NODE_CLASS_MAPPINGS.update(SHOW_NODES_MAPPINGS)
NODE_CLASS_MAPPINGS.update(FILL_MASKED_MAPPINGS)
NODE_CLASS_MAPPINGS.update(MASK_OPERATIONS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(LOAD_AUDIO_MAPPINGS)
@@ -580,7 +573,6 @@ NODE_DISPLAY_NAME_MAPPINGS.update(CHECK_MASK_DISPLAY)
NODE_DISPLAY_NAME_MAPPINGS.update(PURGE_VRAM_DISPLAY)
NODE_DISPLAY_NAME_MAPPINGS.update(CROP_MASK_DISPLAY)
NODE_DISPLAY_NAME_MAPPINGS.update(RESTORE_CROP_DISPLAY)
NODE_DISPLAY_NAME_MAPPINGS.update(SHOW_NODES_DISPLAY_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(FILL_MASKED_DISPLAY_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(LOAD_AUDIO_DISPLAY_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(AUDIO_CROP_DISPLAY_MAPPINGS)
@@ -617,7 +609,6 @@ NODE_CATEGORIES = {
"PurgeVRAM_UTK",
"CropByMask_UTK",
"RestoreCropBox_UTK",
"Show_UTK",
"TextboxNode_UTK",
"TextConcatenate_UTK",
"MathExpression_UTK",
-56
View File
@@ -1,56 +0,0 @@
"""
Show Nodes
~~~~~~~~~
Display and preview nodes for various data types.
:copyright: (c) 2024 by May
:license: MIT, see LICENSE for more details.
"""
import torch
class Show_UTK:
CATEGORY = "UniversalToolkit/Tools"
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"input": ("STRING", "INT", "FLOAT", "LIST", "MASK", "IMAGE", "LATENT")
}
}
RETURN_TYPES = ("STRING", "INT", "FLOAT", "LIST", "MASK", "IMAGE", "LATENT")
RETURN_NAMES = ("string", "int", "float", "list", "mask", "image", "latent")
FUNCTION = "show"
IS_PREVIEW = True
def show(self, input):
outs = [None] * 7
if isinstance(input, str):
outs[0] = input
elif isinstance(input, int):
outs[1] = input
elif isinstance(input, float):
outs[2] = input
elif isinstance(input, list):
outs[3] = input
elif hasattr(input, "shape") and len(input.shape) == 4 and input.shape[1] == 1:
outs[4] = input # MASK
elif hasattr(input, "shape") and len(input.shape) == 4 and input.shape[1] == 3:
outs[5] = input # IMAGE
elif isinstance(input, dict) and "samples" in input:
outs[6] = input # LATENT
return tuple(outs)
# Node mappings
NODE_CLASS_MAPPINGS = {
"Show_UTK": Show_UTK,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"Show_UTK": "Show (UTK)",
}