KayTool nodes is designed to enhance the efficiency of building ComfyUI workflows. It includes a variety of practical nodes: support for efficient models like BiRefNet and RemBG for background removal and mask post-processing, wireless data transfer (Set & Get ), AI translation (Tencent and Baidu), dynamic mathematical operations, image processing (size extraction, color adjustment, background removal, mask blurring and expansion), flexible text handling, precision sliders, advanced image saving with metadata support, and more.
This is a custom node utility package developed for ComfyUI. Initially created for personal convenience, I will continue adding features in the future.
节点预览 Nodes Preview (不全 Not All):
当前功能 Current Features
📌 所有 KayTool 节点包用到的资源都在 ComfyUI/custom_nodes/kaytool 文件夹内。| All KayTool node packages use resources in the ComfyUI/custom_nodes/kaytool folder.
workflow PNG功能 Workflow Export to PNG
支持在右键菜单中KayTool-workflow PNG将当前工作流节点地图保存为PNG格式并内嵌工作流信息。
Supports saving the current workflow node map as a PNG format and embedding workflow information in the right-click menu.
自定义ComfyUI Logo功能 Custom ComfyUI Logo
在设置菜单中(KayTool)自定义 ComfyUI 的 Logo,支持 PNG、JPG、JPEG 格式。
Customize the ComfyUI Logo in the settings menu (KayTool), supporting PNG, JPG, and JPEG formats.
快速 Run 功能 Quick Run Options (Run Group/Node)
右键点击节点组或节点,选择“Run Group/Node”,即可快速运行节点组或节点进行调试。
Right-click on a node group or node, select "Run Group/Node," and quickly run the node group or node for debugging.
使用快捷键Shift+R快速运行选中节点。
Use the shortcut key Shift+R to quickly run the selected node.
强大的 BiRefNet 预训练模型:BiRefNet、BiRefNet_HR、BiRefNet-portrait,适用于不同背景移除场景。 Offers multiple powerful pre-trained model options: BiRefNet, BiRefNet_HR, BiRefNet-portrait, suitable for various background removal scenarios.
支持多种硬件加速(如 CPU、CUDA、MPS 等),可根据设备自动优化性能。 Supports various hardware acceleration options (e.g., CPU, CUDA, MPS) with automatic performance optimization based on the device.
兼容 REMOVE_BG 类型输出,供后续节点使用。 Compatible with REMOVE_BG type output, for use in subsequent nodes.
RemBGLoader: Offers multiple pre-trained model options (e.g., u2net, isnet-general-use, sam) for different background removal scenarios. Supports various hardware acceleration providers (e.g., CPU, CUDA, TensorRT) with automatic performance optimization based on the device. The loaded model is output as a REMBG_LOADER type for use in subsequent nodes.
RemoveBG: Processes images using the loaded background removal model to generate transparent or custom-colored backgrounds. Supports mask blurring and expansion for enhanced background removal effects. Offers multiple background preview options (black, white, red, green, blue) for quick result validation. Outputs the processed image and mask for subsequent compositing or editing needs.
Combined Workflow: Load the model and configure hardware acceleration using RemBGLoader, then process images with RemoveBG for background removal, with flexible adjustments for mask effects and background styles.
批量图片载入节点 Load Image Folder
提供图片的批量载入及批处理。
Provide batch loading and batch processing of images.
支持 image 和 mask 的批量输出。
Support batch output of images and masks.
无线数据传输节点 Set & Get
提供 Set 和 Get 两种节点,通过唯一的 ID 实现无线数据传输,帮助建立干净整洁的工作流。
Set 节点:允许用户定义唯一的 ID,并动态设置输入数据类型,支持实时验证和更新,确保数据的唯一性和一致性。
Get 节点:通过匹配的 ID 无线获取对应的 Set 节点数据,自动同步数据类型,减少节点间的复杂连接。
支持多种数据类型(如字符串、数字、图像等),并动态调整连接类型,提升工作流的灵活性。
提供错误提示和调试功能,确保节点间数据传输的正确性,避免因连接错误导致的工作流中断。
核心优势:通过无线数据传输机制,大幅简化节点布局,帮助用户构建更加干净、整洁、高效的工作流。
Provides Set and Get nodes to enable wireless data transfer via unique IDs, helping to create clean and organized workflows.
Set Node: Allows users to define a unique ID and dynamically set input data types, with real-time validation and updates to ensure data uniqueness and consistency.
Get Node: Wirelessly retrieves data from the corresponding Set node by matching ID, automatically synchronizing data types and reducing complex connections between nodes.
Supports various data types (e.g., strings, numbers, images) with dynamic adjustment of connection types, enhancing workflow flexibility.
Includes error notifications and debugging features to ensure correct data transmission between nodes, avoiding workflow interruptions caused by connection errors.
Key Advantage: Simplifies node layouts through wireless data transfer, enabling users to build cleaner, more organized, and efficient workflows.
数学表达式计算节点 AbcMath
支持动态解析数学表达式。
提供多种运算符和函数支持(加、减、乘、除、幂、取模等)。
支持变量 a、b、c 的灵活输入(数字或数组形状)。
内置常用数学函数(min、max、round、sum、len 等)。
自动处理 NaN 值,确保结果稳定性。
输出整数和浮点数两种格式。
适用于复杂计算场景。
Supports dynamic parsing of mathematical expressions.
Provides a wide range of operators and functions (addition, subtraction, multiplication, division, power, modulo, etc.).
Flexible input for variables a, b, and c (numbers or array shapes).
Built-in common math functions (min, max, round, sum, len, etc.).
Automatically handles NaN values to ensure result stability.
Outputs results in both integer and float formats.
Suitable for complex calculation scenarios.
自动翻译节点 AIOTranslater
支持单文本输入的自动翻译。
内置高效 AI 翻译引擎,无需手动获取 API 密钥。
提供高质量翻译结果,适用于多种语言场景。
支持多种目标语言选择(英语、中文、德语、西班牙语等)。
自动检测源语言,简化用户操作。
高效稳定,适合快速集成到工作流中。
Supports automatic translation of single text input.
Built-in high-efficiency AI translation engine, no need to manually obtain API keys.
Provides high-quality translations for various language scenarios.
Offers multiple target language options (English, Chinese, German, Spanish, etc.).
Automatically detects source language for simplified user experience.
Efficient and stable, ideal for quick integration into workflows.
大壮提示词生成节点 StrongPrompt
基于 CLIP 模型生成高质量的正向和负向提示词嵌入。
支持灵活的预设样式选择,快速构建复杂提示词。
提供多种控制开关(启用/禁用负向输出、预设样式、ID 输入等)。
自动加载本地 JSON 文件中的预设样式数据,无需手动配置。
支持通过 ID 快速选择多个样式组合。
可零化负向提示词嵌入,满足特定场景需求。
适用于扩散模型的条件化输入,提升生成效果。
Generates high-quality positive and negative prompt embeddings using the CLIP model.
Supports flexible preset style selection for quickly building complex prompts.
Install via ComfyUI Manager by searching for KayTool.
Clone this project into your ComfyUI/custom_nodes directory, ensuring color profile files are placed in the resources directory.