No description
  • Python 50.6%
  • Vue 32.9%
  • JavaScript 9.2%
  • HTML 4.6%
  • CSS 1.5%
  • Other 1.2%
Find a file
Lumorian cf4647e2e5 feat: flatten batch download zip, add multi-select rerun and sort by input name
- Flatten multi-select download ZIP: output files at root level without
  per-task folders, with #{completed_index} collision disambiguation
- Add batch re-execute button for selected completed/failed tasks via
  /api/tasks/batch-add endpoint; extract shared buildRequeuePayload utility
- Add task list sorting by input image filename with persist-to-localStorage
  el-select dropdown (default / asc / desc, natural order)
- Refactor rerunTask to use shared utility, add 34 frontend tests
2026-05-17 21:24:27 +08:00
.claude test: add failing tests for folder-drop batch on unpinned node in multi-select mode 2026-05-17 18:40:20 +08:00
backend feat: flatten batch download zip, add multi-select rerun and sort by input name 2026-05-17 21:24:27 +08:00
frontend feat: flatten batch download zip, add multi-select rerun and sort by input name 2026-05-17 21:24:27 +08:00
tests feat: flatten batch download zip, add multi-select rerun and sort by input name 2026-05-17 21:24:27 +08:00
.gitignore Add task progress, reruns, and drag-and-drop uploads 2026-04-21 22:11:44 +08:00
README.md Add unified startup scripts 2026-04-22 00:31:00 +08:00
requirements.txt feat: workflow variables, task detail dialog, WebSocket, webhook, and Element Plus on-demand 2026-05-16 16:17:24 +08:00
run.bat Add unified startup scripts 2026-04-22 00:31:00 +08:00
run.sh 更新 Linux 启动脚本使用虚拟环境 2026-04-22 14:20:26 +08:00

ComfyUI 自动化工具

一个带有 WebUI 界面的 ComfyUI 任务自动化工具,支持任务排队、自动重试和结果预览。

功能特性

  • API 文件管理 - 上传和管理 ComfyUI API JSON 文件
  • 图片导入 - 可视化选择 LoadImage 节点并导入图片
  • 任务队列 - 支持多个任务排队,自动依次执行
  • 自动重试 - 检测到纯黑图片或任务失败时自动重试最多3次
  • 结果预览 - 支持预览和下载生成的图片
  • ComfyUI 状态 - 实时显示 ComfyUI 队列状态

快速开始

环境要求

  • Python 3.10+
  • Node.js 18+
  • ComfyUI需要运行在 http://127.0.0.1:8188

安装

1. 安装 Python

2. 安装 Node.js

3. 安装项目依赖

# 进入项目目录(请替换为实际路径)
cd D:\Program-Files\auto-comfyui

# 安装后端依赖
pip install -r requirements.txt

# 安装前端依赖
cd frontend
npm install

也可以跳过手动安装,启动脚本会在依赖缺失时自动安装。

启动

统一启动脚本会同时启动后端和前端:

Linux / macOS

chmod +x run.sh
./run.sh

Windows

双击 run.bat,或在项目根目录执行:

.\run.bat

打开浏览器访问 http://localhost:3000

手动启动(备用)

注意:后端必须从项目根目录启动,不能在 backend 文件夹内启动。

打开 两个 终端窗口:

终端 1 - 启动后端(端口 8000

cd D:\Program-Files\auto-comfyui
python -m uvicorn backend.main:app --host 0.0.0.0 --port 8000

终端 2 - 启动前端(端口 3000

cd D:\Program-Files\auto-comfyui\frontend
npm run dev

打开浏览器访问 http://localhost:3000

使用流程

  1. 上传 API 文件 - 在首页上传 ComfyUI 导出的 API JSON 文件
  2. 选择节点 - 系统会自动选择"添加模特"节点(或其他指定节点)
  3. 导入图片 - 上传需要使用的图片
  4. 添加到队列 - 点击添加到任务队列
  5. 执行任务 - 切换到任务队列页面,点击"开始执行"

项目结构

auto-comfyui/
├── backend/
│   ├── main.py          # FastAPI 后端入口
│   ├── parser.py        # API 文件解析器
│   ├── comfy_client.py  # ComfyUI API 客户端
│   ├── scheduler.py     # 任务调度器
│   ├── image_checker.py # 图片检测器(纯黑图片识别)
│   └── models.py        # 数据模型
├── frontend/
│   └── src/
│       ├── views/       # 页面组件
│       └── router/      # 路由配置
├── data/                # 数据存储目录
│   ├── api_files/       # 上传的 API 文件
│   ├── input_images/    # 上传的输入图片
│   └── output/          # 输出图片
└── requirements.txt     # Python 依赖

配置

修改 ComfyUI 地址

在首页可以修改 ComfyUI 的连接地址(默认 http://127.0.0.1:8188

修改端口

  • 后端:修改 backend/main.py 中的端口或启动命令
  • 前端:修改 frontend/vite.config.js 中的端口

注意事项

  • 确保 ComfyUI 已启动并可访问
  • 上传的 API 文件中的 LoadImage 节点图片路径需要正确
  • 任务执行过程中请勿关闭 ComfyUI

技术栈

  • 后端FastAPI + Python
  • 前端Vue 3 + Element Plus
  • 图片检测Pillow + NumPy

License

MIT