Harden local updater and install changed dependencies

This commit is contained in:
Codex
2026-09-24 10:07:37 +00:00
parent 5fccb3e8eb
commit fa9d571c18
5 changed files with 112 additions and 36 deletions
+11 -26
View File
@@ -14,36 +14,27 @@
## 📦 安装
### 方法一:通过 ComfyUI Manager(推荐
1. 在 ComfyUI 中打开 Manager
2. 搜索 `Comfyui_o1key`
3. 点击安装
4. 重启 ComfyUI
### 方法二:手动安装
### 通过公开 Gitea 仓库安装(无需登录
```bash
cd ComfyUI/custom_nodes
git clone https://github.com/lizhongyi1209/comfyui_o1key.git
git clone https://git.o1key.com/publisher/comfyui_o1key.git
cd comfyui_o1key
pip install -r requirements.txt
python -m pip install -r requirements.txt
```
然后重启 ComfyUI
请在 ComfyUI 使用的 Python 环境中运行安装命令,然后重启 ComfyUI。之后可直接使用左侧功能栏的「更新」按钮
### 国内用户安装(GitHub 拉取慢或失败时)
### 已通过 GitHub 安装的用户
使用 Gitee 镜像安装与更新,避免网络问题
在节点包目录中把更新地址切换到 Gitea,即可继续保留现有安装和本地配置
```bash
cd ComfyUI/custom_nodes
git clone https://gitee.com/resonLzy/comfyui_o1key.git
cd comfyui_o1key
pip install -r requirements.txt
cd ComfyUI/custom_nodes/comfyui_o1key
git remote set-url origin https://git.o1key.com/publisher/comfyui_o1key.git
```
自动更新脚本(见下方「更新插件」)已改为从 Gitee 拉取,国内用户可直接使用
仓库公开读取,无需为用户配置 Gitea 账号或令牌
---
@@ -134,16 +125,10 @@ O1KEY_API_KEY=你的API密钥
### 界面更新
在 ComfyUI 左侧功能栏点击「更新」(位于「重启」下方)。按钮会从当前 Git 仓库的 `origin/main` 拉取最新版本。完成后点击「重启」使新版本生效。
本机 ComfyUI 左侧功能栏点击「更新」(位于「重启」下方)。按钮会从当前 Git 仓库的 `origin/main` 拉取最新版本;依赖列表有变化时,会在 ComfyUI 当前 Python 环境中自动安装。完成后点击「重启」使新版本生效。
界面更新需要通过 Git 安装、处于 `main` 分支,且节点包文件没有本地修改。更新仅允许快进,不会覆盖本地修改或删除配置。ZIP 安装、分支分叉或网络连接失败时,界面会显示原因,需要手动处理。
如果提示依赖列表已变化,请在 ComfyUI 使用的 Python 环境中执行:
```bash
cd ComfyUI/custom_nodes/comfyui_o1key
python -m pip install -r requirements.txt
```
为了防止其他网站或局域网设备触发本机的软件管理操作,「更新」和「重启」按钮只能在本机打开的 ComfyUI 页面使用。
### 手动更新