ComfyUI custom node for cloud-based workflow execution via BizyAir API
Project description
☁️ BizyAir-CloudBerry
ComfyUI 自定义节点插件,通过 BizyAir/SCX API 实现工作流的云端执行。支持将 ComfyUI 工作流提交到云端运行,同时保持本地 UI 集成和实时事件流。
功能特性
- 云端执行:将本地 ComfyUI 工作流提交至云端运行
- 实时进度:通过 WebSocket 实时获取任务执行进度
- 自动资源处理:自动处理模型和文件的云端上传下载
- 无缝集成:保留原生 ComfyUI 使用体验
环境要求
- Python >= 3.10
- ComfyUI
- BizyAir API Key
快速开始
1. 安装插件
# 克隆项目到 ComfyUI custom_nodes 目录
git clone https://github.com/siliconflow/BizyAir-CloudBerry.git ComfyUI/custom_nodes/BizyAir-CloudBerry
# 安装依赖
cd ComfyUI/custom_nodes/BizyAir-CloudBerry
pip install -e .
# 开发模式
pip install -e ".[dev]"
# 格式化代码(开发模式下)
ruff format
2. 配置环境变量
在启动 ComfyUI 前设置 API Key:
# Linux/macOS
export BIZYAIR_API_KEY=sk-xxxxxx
# Windows (PowerShell)
$env:BIZYAIR_API_KEY="sk-xxxxxx"
或者在运行 ComfyUI 的终端中设置后再启动 ComfyUI。
3. 启动 ComfyUI
cd ComfyUI
python main.py
项目结构
BizyAir-CloudBerry/
├── bizyair_cloudberry/
│ ├── __init__.py # 插件入口,注册节点
│ ├── cloudberry_node.py # CloudBerry 主节点实现
│ ├── hijack.py # 拦截 ComfyUI 提示词
│ ├── scx_api_executor.py # SCX API 通信与 WebSocket 流
│ ├── event_processor.py # 远程事件转换处理
│ ├── input_handler.py # 文件/模型映射与解析
│ ├── file_utils.py # OSS 文件上传下载
│ ├── progress_handler.py # 进度处理
│ └── env.py # 环境变量管理
├── docs/ # 开发文档
│ └── EXECUTE_WORKFLOW.md # execute_workflow 执行流程说明
├── tests/ # 测试用例
│ ├── test_file_utils.py # 文件上传下载集成测试
│ ├── test_scx_executor.py # SCXAPIExecutor 的execute_workflow集成测试脚本(事件接收)
│ ├── image_test.json # 测试用工作流 JSON
│ ├── api_executor_test_case/ # 单元测试(已废弃 ⚠️)
│ │ # 废弃原因:GitHub Action 无法连接 WebSocket
│ └── ui/ # Playwright UI 测试
│ ├── playwright.config.ts
│ └── tests/ # UI 测试用例
├── pyproject.toml # 项目配置
└── README.md # 本文件
开发文档
- execute_workflow 执行流程说明 - 详解 SCXAPIExecutor 核心方法的执行流程、WebSocket 通道和任务取消机制
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bizyair_cloudberry-0.1.0.tar.gz
(23.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bizyair_cloudberry-0.1.0.tar.gz.
File metadata
- Download URL: bizyair_cloudberry-0.1.0.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9114fed08e6ce88341461df097ba9d1171348b5b2c0acef154049decb8982f78
|
|
| MD5 |
24c23222236cd1cd7b0641286f8d5b91
|
|
| BLAKE2b-256 |
8cdacfd02f064ab66071ccd2f19025cd3e4629e8c123b0205cdcf42b03c8a3ee
|
File details
Details for the file bizyair_cloudberry-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bizyair_cloudberry-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9809251d58bcb4fb0c363f7c96deb0e68cd8390aead7db9e49e5db1b214b0877
|
|
| MD5 |
41f9f846597869ce1b69fe04cac8a925
|
|
| BLAKE2b-256 |
30a30a5bb0aef1fe4ed3b0a80ca5ae3eeb73544b5d1e4f26e4e1acbe3d1efaa1
|