{"id":33899466,"url":"https://github.com/FeiMao-326/Comfyui-General-API-Node","last_synced_at":"2025-12-16T21:00:41.531Z","repository":{"id":315622490,"uuid":"1060235643","full_name":"FeiMao-326/Comfyui-General-API-Node","owner":"FeiMao-326","description":"ComfyUI's generic vision API node, with native Ollama automatic GPU cleanup and first and last frame cues.","archived":false,"fork":false,"pushed_at":"2025-12-12T09:35:25.000Z","size":2958,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-13T21:37:46.780Z","etag":null,"topics":["comfyui","comfyui-first-and-last-frames","comfyui-general-api-node","comfyui-prompt-words","llm","ollama"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FeiMao-326.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-19T15:29:00.000Z","updated_at":"2025-12-12T09:29:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ba4a9ac-5364-4a3b-b5f3-d98bc20c9c31","html_url":"https://github.com/FeiMao-326/Comfyui-General-API-Node","commit_stats":null,"previous_names":["feimao-326/comfyui-general-api-node"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/FeiMao-326/Comfyui-General-API-Node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeiMao-326%2FComfyui-General-API-Node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeiMao-326%2FComfyui-General-API-Node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeiMao-326%2FComfyui-General-API-Node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeiMao-326%2FComfyui-General-API-Node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FeiMao-326","download_url":"https://codeload.github.com/FeiMao-326/Comfyui-General-API-Node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FeiMao-326%2FComfyui-General-API-Node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27771143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui","comfyui-first-and-last-frames","comfyui-general-api-node","comfyui-prompt-words","llm","ollama"],"created_at":"2025-12-11T22:00:48.928Z","updated_at":"2025-12-16T21:00:41.525Z","avatar_url":"https://github.com/FeiMao-326.png","language":"Python","funding_links":[],"categories":["Workflows (3658) sorted by GitHub Stars"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# ComfyUI General API Node Pack\n*Created by FeiMao-326*\n\n[**English**](#english) | [**中文**](#chinese)\n\n\u003c/div\u003e\n\n---\n\u003ca name=\"english\"\u003e\u003c/a\u003e\n\n## 🇬🇧 English\n\nA 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.\n\n### ✨ Nodes Included\n\nThis pack contains the following nodes, all available under the **`FeiMao-326`** category:\n\n1.  **General API Node**: A robust Vision LLM API node.\n    -   Supports multi-image inputs.\n    -   Features automatic GPU cleanup for local Ollama.\n    -   Includes advanced seed control (`fixed`, `increment`, `randomize`).\n2.  **Text Batch Replace**: A powerful text utility for performing up to 8 find-and-replace operations in a single node.\n3.  **JSON Parser**: Deconstructs complex, nested JSON payloads into multiple separate text outputs with a built-in labeled preview. It deeply searches for user-defined keys, perfect for handling structured prompts.\n4.  **Show Text**: Displays input text directly on the node UI.\n5.  **Simple Text**: A simple text input node for passing strings to other nodes.\n6.  **Text Split By Delimiter**: Splits a text string into a list based on a delimiter.\n7.  **Get List Element**: Retrieves a specific element from a list by index.\n8.  **Text Iterator**: Splits text by delimiter and outputs it as a batch, triggering batch execution for downstream nodes.\n\n### 🔧 Installation\n\n1.  **Clone the Repository**\n    -   Open your terminal.\n    -   Navigate to your ComfyUI `custom_nodes` directory:\n        ```bash\n        cd path/to/your/ComfyUI/custom_nodes/\n        ```\n    -   Clone this repository:\n        ```bash\n        git clone https://github.com/FeiMao-326/Comfyui-General-API-Node.git\n        ```\n\n2.  **Install Dependencies**\n    -   Navigate into the newly cloned folder:\n        ```bash\n        cd Comfyui-General-API-Node\n        ```\n    -   Install the required dependencies:\n        ```bash\n        pip install -r requirements.txt\n        ```\n\n3.  **Restart ComfyUI**\n    -   After completing the steps above, please restart ComfyUI completely.\n\n### 💡 How to Use\n\n#### General API Node\n1.  **Finding the Node**: In ComfyUI, you can find the node by right-clicking -\u003e `Add Node` -\u003e `FeiMao-326` -\u003e `FeiMao-326 General API Node`.\n\n    ![FeiMao-326 Node Interface](./assets/node_interface.png)\n\n2.  **Seed Control Setup**: To enable automatic seed changes (e.g., `randomize`), connect the `seed` output of the node back to its own `seed` input. This creates a loop that updates the seed after each run.\n\n3.  **Usage Scenarios**:\n    -   **📝 Text-Only Generation**: Leave both `image_1` and `image_2` disconnected.\n    -   **🖼️ Single Image Description**: Connect an image to `image_1`.\n    -   **🎬 Dual Image for Video Transitions**: Connect a start frame to `image_1` and an end frame to `image_2`.\n    -   **📸 Multi-Image Analysis**: You can connect multiple images (`image_1`, `image_2`, `image_3...etc`) for complex analysis tasks.\n4.  **API Connection Examples**:\n    -   **Local Ollama**:\n        -   `api_baseurl`: `http://127.0.0.1:11434/v1`\n        -   `api_key`: `ollama`\n        -   `model`: `gemma3:4b` (or another vision-capable model)\n        -   `cleanup_local_gpu`: Keep it checked (True).\n    -   **External API (e.g., OpenAI)**:\n        -   `api_baseurl`: `https://api.openai.com/v1`\n        -   `api_key`: Your OpenAI API key (`sk-xxxxxxxx`)\n        -   `model`: `gpt-4o`\n    Below is a complete example workflow for the dual image transition task:\n\n![General API Node Workflow Example](./assets/workflow_example.png)\n\n#### Text Batch Replace\n-   Input any text into the `text` field.\n-   Fill in the `find_x` and `replace_x` fields to perform sequential replacements.\n![Text Batch Replace Interface](./assets/text_batch_replace.png)\n\n#### JSON Parser\n-   Paste your complex JSON into the `json_payload` field.\n-   In the `keys_to_extract` field, enter the keys you want to extract, separated by commas (e.g., `shot, subject, audio`).\n-   The node will find these keys anywhere in the JSON, output their combined values to the corresponding `output_x` ports, and show a preview inside the node.\n![JSON Parser Interface](./assets/json_parser.png)\n\n#### Show Text\n-   Connect any string output to the `text` input.\n-   The text will be displayed on the node itself.\n\n#### Simple Text\n-   Enter your text in the text box.\n-   Connect the `text` output to any node requiring string input.\n\n#### Text Split By Delimiter\n-   Input text and a delimiter (default is comma).\n-   Outputs a `LIST` type that can be used with `Get List Element`.\n![Text Split By Delimiter](./assets/text_split.png)\n\n#### Get List Element\n-   Connect a `LIST` input.\n-   Specify the index (0-based) to retrieve a specific string.\n\n#### Text Iterator\n-   Input text and a delimiter.\n-   Outputs each split item as a separate batch item.\n-   Useful for iterating over a list of prompts or parameters.\n![Text Iterator Interface](./assets/Text_Iterator.png)\n\n### 📜 License\n\nThis project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) and [NOTICE](NOTICE) files for details.\n\n---\n\u003ca name=\"chinese\"\u003e\u003c/a\u003e\n\n## 🇨🇳 中文\n\n一套为 ComfyUI 设计的、功能强大且用途广泛的实用节点包，旨在简化涉及大语言模型和文本处理的复杂工作流。本节点包由 FeiMao-326 创作。\n\n### ✨ 包含的节点\n\n本节点包包含以下节点，您都可以在 **`FeiMao-326`** 分类下找到它们：\n\n1.  **General API Node**: 一个强大的视觉LLM API节点。\n    -   支持多图像输入。\n    -   为本地 Ollama 提供自动 GPU 清理功能。\n    -   包含高级种子控制（`固定`, `递增`, `随机` 等）。\n2.  **Text Batch Replace**: 一个强大的文本工具，可在单个节点中执行多达8次的查找与替换操作。\n3.  **JSON Parser**: 可将复杂的、深度嵌套的JSON结构，解析为多个独立的文本输出，并自带带标签的预览功能。它会深度搜索用户定义的关键字，非常适合处理结构化提示词。\n4.  **Show Text**: 直接在节点界面上显示输入的文本。\n5.  **Simple Text**: 一个简单的文本输入节点，用于将字符串传递给其他节点。\n6.  **Text Split By Delimiter**: 根据分隔符将文本字符串分割为列表。\n7.  **Get List Element**: 通过索引从列表中检索特定元素。\n8.  **Text Iterator**: 根据分隔符分割文本并作为批次输出，触发下游节点的批次执行。\n\n### 🔧 安装方法\n\n1.  **克隆仓库**\n    -   打开您的终端。\n    -   导航到您的 ComfyUI `custom_nodes` 文件夹：\n        ```bash\n        cd path/to/your/ComfyUI/custom_nodes/\n        ```\n    -   克隆此仓库：\n        ```bash\n        git clone https://github.com/FeiMao-326/Comfyui-General-API-Node.git\n        ```\n\n2.  **安装依赖**\n    -   导航到刚刚克隆下来的节点文件夹：\n        ```bash\n        cd Comfyui-General-API-Node\n        ```\n    -   安装所需的依赖项：\n        ```bash\n        pip install -r requirements.txt\n        ```\n\n3.  **重启 ComfyUI**\n    -   完成以上步骤后，请完全重启 ComfyUI。\n\n### 💡 如何使用\n\n#### General API Node\n1.  **找到节点**: 在 ComfyUI 中，您可以通过右键菜单 -\u003e `Add Node` -\u003e `FeiMao-326` -\u003e `FeiMao-326 General API Node` 找到它。\n\n    ![FeiMao-326 节点界面](./assets/node_interface.png)\n\n2.  **设置种子控制**: 若要启用自动种子变更（例如 `randomize`），请将节点的 `seed` **输出**端口连接回它自身的 `seed` **输入**端口。这个“循环”连接会在每次运行后自动更新种子值。\n\n3.  **使用场景**:\n    -   **📝 纯文本生成**: 将 `image_1` 和 `image_2` 保持断开。\n    -   **🖼️ 单图描述**: 连接一张图片到 `image_1` 接口。\n    -   **🎬 双图视频转场**: 连接**起始帧**到 `image_1`，连接**结束帧**到 `image_2`。\n    -   **📸 多图分析**: 您最多可以连接多张图片 (`image_1`, `image_2`, `image_3...等`) 进行复杂的分析任务。\n4.  **API 连接示例**:\n    -   **本地 Ollama**:\n        -   `api_baseurl`: `http://127.0.0.1:11434/v1`\n        -   `api_key`: `ollama`\n        -   `model`: `gemma3:4b` (或其他支持视觉的模型)\n        -   `cleanup_local_gpu`: 保持勾选 (True)。\n    -   **外部 API (以 OpenAI 为例)**:\n        -   `api_baseurl`: `https://api.openai.com/v1`\n        -   `api_key`: 填入您的 OpenAI 密钥 (`sk-xxxxxxxx`)\n        -   `model`: `gpt-4o`\n    下面是一个完整的双图转场任务的示例工作流：\n\n![General API Node 工作流示例](./assets/workflow_example.png)\n\n#### Text Batch Replace\n-   在 `text` 字段中输入任意文本。\n-   填写 `find_x` 和 `replace_x` 字段以执行顺序替换。\n![Text Batch Replace 界面](./assets/text_batch_replace.png)\n\n#### JSON Parser\n-   将您的复杂JSON粘贴到 `json_payload` 字段中。\n-   在 `keys_to_extract` 字段中，输入您想提取的关键字，用逗号分隔（例如 `shot, subject, audio`）。\n-   节点会在JSON的任何位置找到这些关键字，将其合并后的值输出到对应的 `output_x` 端口，并在节点内显示预览。\n![JSON Parser 界面](./assets/json_parser.png)\n\n#### Show Text\n-   将任何字符串输出连接到 `text` 输入。\n-   文本将直接显示在节点上。\n\n#### Simple Text\n-   在文本框中输入您的文本。\n-   将 `text` 输出连接到任何需要字符串输入的节点。\n\n#### Text Split By Delimiter\n-   输入文本和分隔符（默认为逗号）。\n-   输出一个 `LIST` 类型，可与 `Get List Element` 配合使用。\n![Text Split By Delimiter](./assets/text_split.png)\n\n#### Get List Element\n-   连接 `LIST` 输入。\n-   指定索引（从0开始）以检索特定字符串。\n\n#### Text Iterator\n-   输入文本和分隔符。\n-   将每个分割项作为单独的批次项输出。\n-   用于迭代提示词列表或参数列表。\n![Text Iterator 界面](./assets/Text_Iterator.png)\n\n### 📜 许可证\n\n本项目采用 Apache 2.0 许可证。详情请参阅 [LICENSE](LICENSE) 和 [NOTICE](NOTICE) 文件。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFeiMao-326%2FComfyui-General-API-Node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFeiMao-326%2FComfyui-General-API-Node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFeiMao-326%2FComfyui-General-API-Node/lists"}