← 返回 Skills 市场
3. Windows PowerShell
212
总下载
1
收藏
0
当前安装
7
版本数
在 OpenClaw 中安装
/install comfyui-running
功能描述
全自动运行 ComfyUI 工作流:通过 REST API 执行工作流,支持 Windows / Linux / WSL 跨平台。By comfyui资源网 - www.comfyorg.cn
使用说明 (SKILL.md)
全自动运行 ComfyUI 工作流:通过 CDP 协议控制 Edge 浏览器,自动化操作 ComfyUI 界面,并通过 REST API 执行工作流。
全自动运行 ComfyUI 工作流 | By comfyui资源网
核心功能
| 功能 | 说明 |
|---|---|
| 🚀 自动启动 | 检测 ComfyUI 状态,未运行则自动启动 |
| 📋 工作流管理 | 列出、加载、修改工作流 |
| 🎨 文本生图 | 一句话生成图片 |
| 🔄 跨平台 | Windows / Linux / WSL 自动适配 |
快速开始
一句话生成图片
from comfyui_automation import quick_generate
result = quick_generate("a beautiful cat")
# result = {
# "success": True,
# "image_path": "H:\\ComfyUI-aki-v3\\ComfyUI\\output\\ComfyUI_00001_.png",
# "prompt_id": "xxx-xxx"
# }
完整控制
from comfyui_automation import ComfyUIAutomation
automation = ComfyUIAutomation()
automation.ensure_comfyui_running()
result = automation.generate(
prompt="1girl, portrait",
workflow_name="文生图",
negative_prompt="low quality, blurry",
steps=25,
seed=None, # None=随机
batch_size=1
)
if result["success"]:
print(f"图片路径: {result['image_path']}")
配置说明
config.json 配置项
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
comfyui_root |
✅ | - | ComfyUI 根目录(包含 main.py) |
python_path |
自动检测 | Python 解释器路径 | |
workflows_dir |
自动检测 | 工作流 JSON 目录 | |
output_dir |
{comfyui_root}/output |
图片输出目录 | |
comfyui_port |
8188 | ComfyUI 端口 | |
ui_type |
auto |
UI 类型:aki=秋叶版,official=官方版 |
|
browser_path |
自动检测 | 浏览器路径(CDP 模式用) |
路径格式(跨平台)
| 平台 | 示例 |
|---|---|
| Windows | H:/ComfyUI-aki-v3/ComfyUI 或 H:\\ComfyUI-aki-v3\\ComfyUI |
| Linux | /opt/ComfyUI/ComfyUI |
| WSL | /mnt/h/ComfyUI-aki-v3/ComfyUI |
⚠️ 推荐使用正斜杠
/,Python 会自动处理跨平台兼容性
跨平台自动检测路径
| 平台 | 检测路径 |
|---|---|
| Windows | H:\ComfyUI-aki-v3\ComfyUI, D:\ComfyUI\ComfyUI, 用户目录等 |
| Linux | /opt/ComfyUI/ComfyUI, ~/ComfyUI/ComfyUI |
| WSL | /mnt/h/ComfyUI-aki-v3/ComfyUI 等 |
API 参考
ComfyUIAutomation 类
automation = ComfyUIAutomation()
# ===== 生命周期 =====
automation.is_comfyui_running() # 检测是否运行
automation.start_comfyui() # 启动 ComfyUI
automation.ensure_comfyui_running() # 确保运行(未运行则启动)
# ===== 工作流 =====
automation.list_workflows() # 列出可用工作流
automation.load_workflow(name) # 加载工作流
# ===== 执行生成 =====
automation.generate(
prompt="描述", # 正向提示词
workflow_name="文生图", # 工作流名称
negative_prompt="", # 负向提示词
steps=20, # 采样步数
seed=None, # 种子,None=随机
batch_size=1 # 批次数
)
quick_generate(prompt, **kwargs)
一句话生成快捷函数。
命令行使用
# 直接生成
python -m lib.comfyui_automation "a cute cat" -s 20 -w 文生图
# 参数
# prompt - 提示词
# -s, --steps - 采样步数(默认20)
# -w, --workflow - 工作流名称(默认default)
# -n, --negative - 负向提示词
# --seed - 随机种子
# --batch - 批次数(默认1)
依赖
pip install requests websockets
故障排除
1. 'int' object is not subscriptable
原因: 节点链接格式错误
"model": ["4", 0] ✅ [node_id, output_slot]
"model": 4 ❌ 错误!
2. main.py not found
解决: 检查 config.json 中 comfyui_root 是否指向包含 main.py 的目录
3. Windows PowerShell && 语法错误
# ❌ 错误 (PowerShell 5.x)
cd "..." && python -c "..."
# ✅ 正确
Set-Location "..."
python -c "..."
📌 推荐资源
| 资源类型 | 链接 |
|---|---|
| 🏠 首页 | https://www.comfyorg.cn |
| 📖 教程 | https://www.comfyorg.cn/tutorial |
| 🎭 工作流 | https://www.comfyorg.cn/workflow |
| 💬 整合包 | https://www.comfyorg.cn/shop/1680.html |
版本:2.0.0
许可:MIT
安全使用建议
What to consider before installing:
- Functionality: This skill automates a local ComfyUI instance and a local browser (CDP). It will scan local drives to find ComfyUI, start ComfyUI if needed, and control a browser tab via the Chrome/Edge debugging port.
- Config: You must supply a correct comfyui_root (in config.json or via env vars) or let the skill autodetect. Double-check the skill's config.json before running.
- Env mismatch: The registry metadata claims no required env vars, but the code expects COMFYUI_ROOT, CDP_PORT, COMFYUI_PORT, etc. Treat the config.json as required.
- Side effects: comfyui_browser.py removes proxy-related environment variables at import time (this affects only the running process but may change networking behavior). If you rely on proxy env vars for other tools, be cautious.
- Local-only network: The code talks to 127.0.0.1 endpoints and the browser's debugging websocket; there is no obvious remote exfiltration endpoint in the code/docs, but you should still review the code yourself if you are worried about privacy.
- Best practices: Run the skill in a controlled environment (e.g., a dedicated VM or container) if you are uncertain. Inspect config.json and the Python files (comfyui_browser.py, lib/comfyui_*.py) yourself. Ensure no sensitive data resides in the directories the skill will scan or that could be picked up by its filesystem checks.
If you want, I can point out the exact lines that remove proxy vars, where env vars are read, and where subprocesses and websocket connections are created so you can review them more easily.
功能分析
Type: OpenClaw Skill
Name: comfyui-running
Version: 3.0.2
The skill is a comprehensive automation toolkit for ComfyUI, providing both REST API and browser-based control (via CDP) to execute image generation workflows. It includes robust path detection for Windows, Linux, and WSL, along with automated setup scripts and dependency management (lib/comfyui_automation.py, lib/comfyui_config.py). While the code performs high-privilege actions such as starting local processes, modifying environment variables (clearing proxies), and installing Python packages via pip, these behaviors are standard for local automation tools and are clearly aligned with the stated purpose. No evidence of malicious intent, data exfiltration, or harmful prompt injection was found.
能力评估
Purpose & Capability
The files implement exactly what the description says: auto-detect/start ComfyUI, call the local REST API, and control a browser via CDP. That capability justifies scanning local paths and launching local processes. However, registry metadata said no required binaries/envs while SKILL.md metadata and the implementation expect Python and configuration (COMFYUI_ROOT, ports) — a mismatch between declared requirements and actual code.
Instruction Scope
Runtime instructions and code focus on local operations: probing local debug endpoint (http://127.0.0.1:<cdp_port>/json), connecting to local ComfyUI REST endpoints (127.0.0.1:<port>), controlling a browser via CDP, scanning filesystem locations for ComfyUI installations, and starting processes. These are within the stated purpose. A surprising behavior: comfyui_browser.py removes all environment variables containing 'proxy' at module import (it clears proxy env vars at top-level), which is an unexpected side-effect and may affect other network behavior in the agent process.
Install Mechanism
No install spec is provided (instruction-only skill plus code files), so nothing will be downloaded from external URLs by an automated installer. The SKILL.md recommends pip installing 'requests' and 'websockets' which is proportional to the code's use of HTTP and websockets.
Credentials
The registry metadata lists no required env vars, yet config.json and the lib modules reference several environment variables (COMFYUI_ROOT, COMFYUI_PORT, CDP_PORT, COMFYUI_WORKFLOWS_DIR, COMFYUI_OUTPUT_DIR, etc.) and the code will read/write a local config.json. The code also enumerates drives and filesystem paths to auto-detect ComfyUI — appropriate for detection but broad in scope. The top-level deletion of proxy-related environment variables (performed at import) is a further disproportionate action that wasn't declared.
Persistence & Privilege
The skill is not marked always:true and doesn't appear to modify other skills or global agent settings. It does spawn local processes (ComfyUI, possibly browser) and writes/updates config.json inside the skill directory — expected for this functionality. No evidence it persists credentials or enables permanent external access.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install comfyui-running - 安装完成后,直接呼叫该 Skill 的名称或使用
/comfyui-running触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v3.0.2
- Added _meta.json file for enhanced metadata support.
- No changes to functionality or code; documentation and SKILL.md remain unchanged.
v3.0.1
Major update: Migrated from local ComfyUI automation to full RunningHub API & AI App support.
- Replaced previous local ComfyUI scripts with RunningHub API wrappers and app launchers.
- Now supports generation of images, videos, audio, and 3D models via 220+ RunningHub endpoints.
- Added new scripts, structured data, and extensive model references for unified workflow.
- Strict output & cost display flow: always deliver files via message tool, report costs, never show raw URLs or IDs.
- Persona, routing, and interaction flow fully documented for smooth multimedia AI operation and user experience.
- Old comfyui/local toolchain and tutorials fully removed and replaced with new guidance and references.
v3.0.0
**3.0.0 is a major clean-up and simplification release.**
- Removed 8 example and test scripts, leaving only the core automation code.
- Significantly simplified documentation, focusing on REST API usage and cross-platform support.
- Updated configuration and usage instructions for clarity.
- Added `scripts/debug_detect.py` for debugging.
- Streamlined workflow: example workflows and test scripts are no longer included by default.
v2.0.3
comfyui-running 2.0.3
- Added test scripts: `scripts/test_drive_detection.py` and `scripts/test_fixes.py` for enhanced testing and validation.
- Added compiled config cache file: `lib/__pycache__/comfyui_config.cpython-313.pyc`.
- No changes to user-facing features or documentation.
v2.0.2
## 2.0.2
- 新增 lib 目录并增加 3 个核心 Python 文件:`__init__.py`, `comfyui_automation.py`, `comfyui_config.py`
- 内部结构优化,核心自动化与配置相关代码移至 lib 子模块
- 便于模块化导入和代码维护
- 原有功能和使用方式保持不变
v2.0.1
**Major update: Adds cross-platform, fully automated ComfyUI workflow execution with new API and code structure.**
- Introduced a modular Python automation library (`lib/comfyui_automation.py`) for simplified ComfyUI control and image generation.
- Added `config.json` for unified configuration and easier cross-platform support (Windows/Linux/WSL).
- Included example API-format workflows and quick-start scripts for both code and command-line usage.
- Enhanced documentation covering configuration, detailed API usage, troubleshooting, and file structure.
- Provided new scripts for workflow automation and setup, as well as sample workflows for both UI and API formats.
- Added beginner tutorial and troubleshooting guides for easier onboarding.
v1.0.0
- Initial release of comfyui-running.
- Automates ComfyUI workflow execution using Edge browser CDP control and REST API.
- Supports UI actions: auto-discover tabs, click workflows, activate tabs, simulate keys, take screenshots.
- Integrates REST API to bypass UI bugs and ensure reliable workflow runs.
- Suitable for Windows with required dependencies: Python 3, Node.js, curl, Edge browser.
元数据
常见问题
comfyui-running 是什么?
全自动运行 ComfyUI 工作流:通过 REST API 执行工作流,支持 Windows / Linux / WSL 跨平台。By comfyui资源网 - www.comfyorg.cn. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 212 次。
如何安装 comfyui-running?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install comfyui-running」即可一键安装,无需额外配置。
comfyui-running 是免费的吗?
是的,comfyui-running 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
comfyui-running 支持哪些平台?
comfyui-running 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 comfyui-running?
由 AgentOpen(@agentopen)开发并维护,当前版本 v3.0.2。
推荐 Skills