🇬🇧 English
A suite of powerful and versatile utility nodes for ComfyUI, designed to streamline complex workflows involving Large Language Models and text manipulation. This pack is created by FeiMao-326.
✨ Nodes Included
This pack contains the following nodes, all available under the FeiMao-326 category:
- General API Node: A robust Vision LLM API node.
- Supports multi-image inputs.
- Features automatic GPU cleanup for local Ollama.
- Includes advanced seed control (
fixed,increment,randomize).
- Text Batch Replace: A powerful text utility for performing up to 10 find-and-replace operations in a single node.
- JSON Parser: Deconstructs complex, nested JSON payloads into 8 separate text outputs with a built-in labeled preview. It deeply searches for user-defined keys, perfect for handling structured prompts.
🔧 Installation
-
Clone the Repository
- Open your terminal.
- Navigate to your ComfyUI
custom_nodesdirectory:cd path/to/your/ComfyUI/custom_nodes/ - Clone this repository:
git clone https://github.com/FeiMao-326/Comfyui-General-API-Node.git
-
Install Dependencies
- Navigate into the newly cloned folder:
cd Comfyui-General-API-Node - Install the required dependencies:
pip install -r requirements.txt
- Navigate into the newly cloned folder:
-
Restart ComfyUI
- After completing the steps above, please restart ComfyUI completely.
💡 How to Use
General API Node
-
Finding the Node: In ComfyUI, you can find the node by right-clicking ->
Add Node->FeiMao-326->FeiMao-326 General API Node. -
Seed Control Setup: To enable automatic seed changes (e.g.,
randomize), connect theseedoutput of the node back to its ownseedinput. This creates a loop that updates the seed after each run. -
Usage Scenarios:
- 📝 Text-Only Generation: Leave both
image_1andimage_2disconnected. - 🖼️ Single Image Description: Connect an image to
image_1. - 🎬 Dual Image for Video Transitions: Connect a start frame to
image_1and an end frame toimage_2.
- 📝 Text-Only Generation: Leave both
-
API Connection Examples:
- Local Ollama:
api_baseurl:http://127.0.0.1:11434/v1api_key:ollamamodel:gemma3:4b(or another vision-capable model)cleanup_local_gpu: Keep it checked (True).
- External API (e.g., OpenAI):
api_baseurl:https://api.openai.com/v1api_key: Your OpenAI API key (sk-xxxxxxxx)model:gpt-4oBelow is a complete example workflow for the dual image transition task:
- Local Ollama:
Text Batch Replace
- Input any text into the
textfield. - Fill in the
find_xandreplace_xfields to perform sequential replacements.
JSON Parser
- Paste your complex JSON into the
json_payloadfield. - In the
keys_to_extractfield, enter the keys you want to extract, separated by commas (e.g.,shot, subject, audio). - The node will find these keys anywhere in the JSON, output their combined values to the corresponding
output_xports, and show a preview inside the node.
📜 License
This project is licensed under the Apache 2.0 License. See the LICENSE and NOTICE files for details.
🇨🇳 中文
一套为 ComfyUI 设计的、功能强大且用途广泛的实用节点包,旨在简化涉及大语言模型和文本处理的复杂工作流。本节点包由 FeiMao-326 创作。
✨ 包含的节点
本节点包包含以下三个节点,您都可以在 FeiMao-326 分类下找到它们:
- General API Node: 一个强大的视觉LLM API节点。
- 支持多图像输入。
- 为本地 Ollama 提供自动 GPU 清理功能。
- 包含高级种子控制(
固定,递增,随机等)。
- Text Batch Replace: 一个强大的文本工具,可在单个节点中执行多达10次的查找与替换操作。
- JSON Parser: 可将复杂的、深度嵌套的JSON结构,解析为8个独立的文本输出,并自带带标签的预览功能。它会深度搜索用户定义的关键字,非常适合处理结构化提示词。
🔧 安装方法
-
克隆仓库
- 打开您的终端。
- 导航到您的 ComfyUI
custom_nodes文件夹:cd path/to/your/ComfyUI/custom_nodes/ - 克隆此仓库:
git clone https://github.com/FeiMao-326/Comfyui-General-API-Node.git
-
安装依赖
- 导航到刚刚克隆下来的节点文件夹:
cd Comfyui-General-API-Node - 安装所需的依赖项:
pip install -r requirements.txt
- 导航到刚刚克隆下来的节点文件夹:
-
重启 ComfyUI
- 完成以上步骤后,请完全重启 ComfyUI。
💡 如何使用
General API Node
-
找到节点: 在 ComfyUI 中,您可以通过右键菜单 ->
Add Node->FeiMao-326->FeiMao-326 General API Node找到它。 -
设置种子控制: 若要启用自动种子变更(例如
randomize),请将节点的seed输出端口连接回它自身的seed输入端口。这个“循环”连接会在每次运行后自动更新种子值。 -
使用场景:
- 📝 纯文本生成: 将
image_1和image_2保持断开。 - 🖼️ 单图描述: 连接一张图片到
image_1接口。 - 🎬 双图视频转场: 连接起始帧到
image_1,连接结束帧到image_2。
- 📝 纯文本生成: 将
-
API 连接示例:
- 本地 Ollama:
api_baseurl:http://127.0.0.1:11434/v1api_key:ollamamodel:gemma3:4b(或其他支持视觉的模型)cleanup_local_gpu: 保持勾选 (True)。
- 外部 API (以 OpenAI 为例):
api_baseurl:https://api.openai.com/v1api_key: 填入您的 OpenAI 密钥 (sk-xxxxxxxx)model:gpt-4o下面是一个完整的双图转场任务的示例工作流:
- 本地 Ollama:
Text Batch Replace
JSON Parser
- 将您的复杂JSON粘贴到
json_payload字段中。 - 在
keys_to_extract字段中,输入您想提取的关键字,用逗号分隔(例如shot, subject, audio)。 - 节点会在JSON的任何位置找到这些关键字,将其合并后的值输出到对应的
output_x端口,并在节点内显示预览。

