{"id":13603176,"url":"https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini","last_synced_at":"2025-04-11T14:30:36.380Z","repository":{"id":213322469,"uuid":"733578284","full_name":"ZHO-ZHO-ZHO/ComfyUI-Gemini","owner":"ZHO-ZHO-ZHO","description":"Using Gemini in ComfyUI","archived":false,"fork":false,"pushed_at":"2024-05-22T14:15:11.000Z","size":158,"stargazers_count":741,"open_issues_count":34,"forks_count":65,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-04T11:07:53.313Z","etag":null,"topics":["comfyui","gemini-pro","google-gemini","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZHO-ZHO-ZHO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":"https://afdian.net/a/ZHOZHO"}},"created_at":"2023-12-19T16:35:53.000Z","updated_at":"2025-04-03T07:32:48.000Z","dependencies_parsed_at":"2023-12-20T01:01:17.308Z","dependency_job_id":"e24730d6-fffa-4116-8d11-9061a3abace4","html_url":"https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini","commit_stats":null,"previous_names":["zho-zho-zho/comfyui-gemini"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZHO-ZHO-ZHO%2FComfyUI-Gemini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZHO-ZHO-ZHO%2FComfyUI-Gemini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZHO-ZHO-ZHO%2FComfyUI-Gemini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZHO-ZHO-ZHO%2FComfyUI-Gemini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZHO-ZHO-ZHO","download_url":"https://codeload.github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248419647,"owners_count":21100213,"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","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","gemini-pro","google-gemini","stable-diffusion"],"created_at":"2024-08-01T18:01:55.376Z","updated_at":"2025-04-11T14:30:36.375Z","avatar_url":"https://github.com/ZHO-ZHO-ZHO.png","language":"Python","funding_links":["https://afdian.net/a/ZHOZHO"],"categories":["Python","All Workflows Sorted by GitHub Stars","Custom nodes (7817) sorted by GitHub Stars"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg  src=\"https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/ec15bc39-8111-417b-afc5-67cdfb3a9df5\" alt=\"Gemini项目图\" /\u003e\u003c/p\u003e\n\n\u003c!---\n![Gemini项目图](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/ec15bc39-8111-417b-afc5-67cdfb3a9df5)\n---\u003e\n\n\u003ch1 align=\"center\"\u003eGemini in ComfyUI\u003c/h1\u003e\n\u003c!---\n# Gemini in ComfyUI\n---\u003e\n\n🆕 最新 Gemini 1.5 Pro 模型已加入！\n\n![G1 5发](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/8c3105c7-e165-4b6b-8a46-6ed09ecfb388)\n\n- 支持系统指令设置（System Instruction）\n- 支持多模态 + 多轮对话\n- 可以读取视频、音频等文件（上限 20G）\n- 支持输入的 token 上限达到了 104万8576\n- 目前速率限制比较严，每分钟只有 2 次，每天只有 1000 次\n\n\u003c!---\n![Dingtalk_20240411192338](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/ee7997a7-75de-4787-9034-e3547b962b70)\n---\u003e\n\n![Dingtalk_20240411194828](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/c1f71846-db5e-4bb1-a1b7-0b278ee95ea8)\n\n\n已支持文件上传功能，不过还仅限于单个文件（图片、txt文件、pdf文件、音频mp3文件等），未来会支持多文件上传（用于读取视频）\n\n\u003c!---\n![Dingtalk_20231220204257](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/07c68b08-858b-4233-a48b-1069552fc8d8)\n---\u003e\n\nAll-in-One LoRa Training 预处理、自动打标、训练、测试 LoRA 一条龙工作流\n\nhttps://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/d461f656-6888-48a8-b4f8-b70b7e46504d\n\n\nV2.0 聊天机器人节点\n\nhttps://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/cb64ee29-a983-47fd-b26b-55386314afdd\n\n\n将 Gemini pro vision 用于批量打标\n\n\nhttps://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/00addc94-1587-40d6-83f4-6b47dc1db665\n\n\n\n## 项目介绍 | Info\n\n- 将 Google Gemini 引入到 ComfyUI 中，现在你可以用它为你生成提示词、描述图像，也可与它畅聊人生\n\n- 目前 Gemini API 免费开放（20240502 开始计费），你可以在这里申请一个自己的 API Key：[Gemini API 申请](https://makersuite.google.com/app/apikey)\n\n- 最新 Gemini 1.5 Pro 模型：\n  \n    - 支持系统指令设置（System Instruction）\n    - 支持多模态 + 多轮对话，\n    - 可以读取视频、音频等文件（上限 20G）\n    - 支持输入的 token 上限达到了 104万8576\n    - 目前速率限制比较严，每分钟只有 2 次，每天只有 1000 次\n\n- 版本：V3.0 新增 Gemini 1.5 Pro 模型、系统指令、文件上传\n\n\n\n## 详细说明 | Features\n\n- Gemini 目前提供 3 种模型：\n\n   - Gemini-pro: 文本模型\n\n   - Genimi-pro-vision: 文本 + 图像模型\n   \n   - Gemini 1.5 Pro：文本 + 图像 + 文件（音频、视频等各类） 模型\n\n\n- Gemini 1.5 Pro 新节点：\n   \n   - 🆕Gemini_15P_Advance_Zho：支持系统指令设置（System Instruction）\n \n   - 🆕Gemini_15P_Chat_Advance_Zho：支持系统指令设置（System Instruction）+ 多轮对话\n   \n   - 📄Gemini_FileUpload_Zho：支持单文件上传（图片、音频、文本txt、pdf等），暂未支持视频（多文件）上传\n   \n   - 📄Gemini_File_Zho：文件读取对话，最大 token 数为 1048576\n\n\n- 2 类节点:\n\n   - 隐式 API KEY：将 Gemini_API_Key 设置为了环境变量，更安全，方便分享工作流（不会外泄 API KEY）\n     \n       ㊙️Gemini_Zho：同时支持 3 种模型，其中 Genimi-pro-vision 和 Gemini 1.5 Pro 可接受图像作为输入\n     \n       ㊙️Gemini_Vsion_ImgURL_Zho：Genimi-pro-vision 和 Gemini 1.5 Pro 模型，接受图像链接作为输入\n     \n       ㊙️Gemini_Chat_Zho：Genimi-pro 和 Gemini 1.5 Pro 模型，支持上下文对话，聊天机器人，Gemini 1.5 Pro 支持图像输入的上下文对话\n\n   - 显式API KEY：直接在节点中输入 Gemini_API_Key，仅供个人私密使用，请勿将包含 API KEY 的工作流分享出去\n     \n       ✨Gemini_API_Zho：同时支持 3 种模型，其中 Genimi-pro-vision 和 Gemini 1.5 Pro 可接受图像作为输入\n  \n       ✨Gemini_API_Vsion_ImgURL_Zho：Genimi-pro-vision 和 Gemini 1.5 Pro 模型，接受图像链接作为输入\n     \n       ✨Gemini_API_Chat_Zho：：Genimi-pro 和 Gemini 1.5 Pro 模型，支持上下文对话，聊天机器人，Gemini 1.5 Pro 支持图像输入的上下文对话\n\n- 辅助节点:\n\n   - ✨DisplayText_Zho：显示文本\n     \n   - ✨ConcatText_Zho：使用 “，” 连接文本\n\n- 节点示例：\n\n\u003c!---\n![Dingtalk_20240411193428](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/149d5841-71f1-4a7c-a92d-e30ecc07421c)\n---\u003e\n\n![Dingtalk_20231220180446](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/3cba8d69-09bb-470c-940c-7f796c869d63)\n\n聊天机器人\n\n![image](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/8a38f437-0148-4777-b872-e88995dd53d2)\n\n\n## 参数说明 | Parameters\n\n- image（非必要）：选择 Gemini-pro 时无需接入图像，选择 Genimi-pro-vision 时需要接入图像，选择 Gemini 1.5 Pro 既可接入也可不接\n- prompt：提示词\n- model_name：模型选择，Gemini-pro 或 Genimi-pro-vision 或 Gemini 1.5 Pro\n- stream：流式传输响应\n- api_key：输入 Gemini_API_Key （仅在显式节点上有）\n\n## 使用方法 | How to use\n\n- 首先需要申请一个自己的 Gemini_API_Key：[Gemini API 申请](https://makersuite.google.com/app/apikey) \n\n- 选择隐式节点㊙️（推荐）：将你的 Gemini_API_Key 添加到 `config.json` 文件中，运行时会自动加载\n\n- 选择显示节点✨：直接将 Gemini_API_Key 输入到节点的 api_key 中（注意：请勿将包含此节点的工作流分享出去，以免泄露你的 API Key）\n\n- 使用注意：本地使用请确保你可以有效连接到 Google Gemini 的服务，推荐使用 Colab 或 Kaggle（无连接问题）\n\n- 使用新版 Gemini 1.5 Pro 需要更新依赖 google-generativeai \u003e 0.4.1\n\n## 安装 | Install\n\n- 推荐使用管理器 ComfyUI Manager 安装\n\n- 手动安装：\n    1. `cd custom_nodes`\n    2. `git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini.git`\n    3. `cd custom_nodes/ComfyUI-Gemini`\n    4. `pip install -r requirements.txt`\n    5. 重启 ComfyUI\n\n## 工作流 | Workflow\n\n### V3.0 平替 DALL·3\n\n[Gemini 1.5 Pro + Stable Diffusion + ComfyUI = DALL·3 ](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/blob/main/Gemini_workflows/Gemini%201.5%20Pro%20%2B%20Stable%20Diffusion%20%2B%20ComfyUI%20%3D%20DALL%C2%B73%20%E3%80%90Zho%E3%80%91.json)\n\n\n![Dingtalk_20240411195451](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/4e32d13d-615e-4441-931e-233c07cc958c)\n\n\n### V2.0 工作流（隐式）（V1.1工作流依旧可用）\n\n[Gemini-pro Chatbot【Zho】](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/blob/main/Gemini_workflows/Gemini-pro%20Chatbot%E3%80%90Zho%E3%80%91.json)\n\n![image](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/8a38f437-0148-4777-b872-e88995dd53d2)\n\n### V1.1 工作流（隐式）\n\n[Gemini-pro【Zho】](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/blob/main/Gemini_workflows/Gemini-pro%E3%80%90Zho%E3%80%91.json) \n\n![Dingtalk_20231220183708](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/7f0e222a-2de4-4c5b-883a-2172667d1d5b)\n\n[Genimi-pro-vision【Zho】](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/blob/main/Gemini_workflows/Gemini-pro-vision%E3%80%90Zho%E3%80%91.json)\n\n![Dingtalk_20231220192932](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/db4f4bf6-a0cf-42af-ac5a-7e2afd1bda93)\n\n![Dingtalk_20231220190218](https://github.com/ZHO-ZHO-ZHO/ComfyUI-Gemini/assets/140084057/5bb57f7b-f00f-454a-9435-c1b8a02ae71a)\n\n\n## 更新日志 | Changelog\n\n20240411\n\n- V3.0版：新增 Gemini 1.5 Pro 模型、系统指令、文件上传\n\n- 新增 平替 DALL·3 工作流（Gemini 1.5 Pro + Stable Diffusion + ComfyUI = DALL·3）\n\n20231229\n\n- V2.1版：修复 Deadline of 60.0s bug，方法来自官方：https://github.com/google/generative-ai-python/issues/117\n\n20231222\n\n- V2.0版：新增上下文聊天节点，相当于聊天机器人\n    - 💬Gemini_Chat_Zho（隐式）\n    - 💬Gemini_API_Chat_Zho（显示）\n\n20231221\n\n- V1.1版：修改 API KEY 的加载方式为自动添加 config.json ，将 API KEY 写入即可\n  \n- 已登陆 manager 不用手动安装了\n\n20231220\n\n- 实现 Genimi-pro-vision 模型调用，支持图像或图像链接输入\n- 增加隐式节点，更加安全\n- 增加辅助节点\n\n20231219\n\n- 创建 ComfyUI Gemini 项目，实现 Gemini-pro 模型调用\n\n\n## Stars \n\n[![Star History Chart](https://api.star-history.com/svg?repos=ZHO-ZHO-ZHO/ComfyUI-Gemini\u0026type=Timeline)](https://star-history.com/#ZHO-ZHO-ZHO/ComfyUI-Gemini\u0026Timeline)\n\n\n## 关于我 | About me\n\n📬 **联系我**：\n- 邮箱：zhozho3965@gmail.com\n- QQ 群：839821928\n\n🔗 **社交媒体**：\n- 个人页：[-Zho-](https://jike.city/zho)\n- Bilibili：[我的B站主页](https://space.bilibili.com/484366804)\n- X（Twitter）：[我的Twitter](https://twitter.com/ZHOZHO672070)\n- 小红书：[我的小红书主页](https://www.xiaohongshu.com/user/profile/63f11530000000001001e0c8?xhsshare=CopyLink\u0026appuid=63f11530000000001001e0c8\u0026apptime=1690528872)\n\n💡 **支持我**：\n- B站：[B站充电](https://space.bilibili.com/484366804)\n- 爱发电：[为我充电](https://afdian.net/a/ZHOZHO)\n\n\n## Credits\n\n- DisplayText节点参考了：[ComfyUI_Custom_Nodes_AlekPet](https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet)，感谢 AlekPet ！\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZHO-ZHO-ZHO%2FComfyUI-Gemini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZHO-ZHO-ZHO%2FComfyUI-Gemini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZHO-ZHO-ZHO%2FComfyUI-Gemini/lists"}