zeroa234/dsh-comfyui

ComfyUI 驱动器(AI-first 合同制):模型只见合同槽、不见工作流 JSON。文生图/图生图/文生视频/图生视频模板,双重预检防幻觉,官方/自定义节点活体判定。

Project Overview项目介绍

This is a native DeepSeek Harness (DSH) plugin that connects to a local or remote ComfyUI service, enabling the large language model inside DSH to call ComfyUI for AI generation tasks including text-to-image, image-to-image, text-to-video, and image-to-video. It uses a contract-first, AI-first design where the model only sees structured capability contracts, never the full workflow JSON. Users make any wiring changes directly in their live ComfyUI instance, which prevents the model from generating fabricated outputs when something goes wrong. To install the plugin, clone the repository, run npm install, then add it to your DSH profile with the dsh plugin command and restart DSH.

Users export their ComfyUI workflows in API format JSON and import them into the plugin. The plugin automatically scans the workflow to generate a structured contract that includes slots, LoRA information, and capability tags for the model to use. Before any generation request is submitted, the plugin runs two preflight checks: it first verifies all required nodes exist and all required inputs are present, then it checks that all required model files exist on the ComfyUI server. Only after all checks pass is the generation request sent, and failures return structured error codes instead of fabricated outputs. This workflow is designed for AI agent users who want reliable access to ComfyUI generation from within DSH.

The plugin is released under the open-source BSD-3-Clause license, and requires an existing running ComfyUI service with API access enabled to work. After installation, users can configure the ComfyUI base URL, template directory, and output directory either through the DSH browser settings page or by overriding values in the profile's cordis.patch.yml configuration file. All user settings are saved to a gitignored file in the templates directory, so they do not get overwritten when the plugin is updated. The plugin is pure JavaScript with no build step required, and includes zero-dependency unit tests for core functionality. Users can regenerate the official node list with a built-in script if needed for new ComfyUI features.

这是一个专为 DeepSeek Harness (DSH) 开发的原生插件,用于连接本地或远程的 ComfyUI 服务,让 DSH 中的大语言模型可以调用 ComfyUI 完成文生图、图生图、文生视频、图生视频等AI生成任务。它采用AI-first合同制设计,模型仅能看到结构化的能力合同,不会接触完整工作流JSON,修改接线由用户在真实ComfyUI中完成,避免模型编造错误输出,保证生成流程的可靠性。

用户可以将 ComfyUI 中导出的 API 格式工作流 JSON 导入插件,插件会自动扫描生成结构化合同,包含槽位、LoRA信息、能力标签等供模型调用的内容。插件会在生成前完成双重预检:先检查节点存在性和必填输入,再验证模型文件是否存在于ComfyUI服务器,全部通过才会提交生成请求。失败时返回结构化错误码,不会编造虚假输出,保障流程透明可控。

本插件遵循 BSD-3-Clause 许可证开源,安装方式为克隆仓库后执行 npm install,再通过 dsh 命令添加到用户配置文件,重启 DSH 后即可使用。用户需要自行配置 ComfyUI 服务地址、模板目录、输出目录,可以通过 DSH 浏览器设置页修改配置,也可以直接在 profile 的配置文件中覆盖。使用前需要提前运行 ComfyUI 服务并开放 API 访问权限。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:zeroa234/dsh-comfyui

把 zeroa234/dsh-comfyui 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-comfyui · ComfyUI 驱动器(DeepSeek Harness)

AI-first 合同制 ComfyUI driver for DeepSeek Harness (dsh).

模型只看见合同(槽 / LoRA 坑 / can / cannot 能力标签),永远看不见工作流 JSON;人要改接线去真 ComfyUI。 The model only sees a contract (slots / LoRA pits / can-cannot capability tags) — never the workflow JSON; rewiring happens in real ComfyUI.

图生图 · 文生图 · 图生视频 · 文生视频:工作流扫描成合同 → 双击预检(节点存在性 + 模型文件)→ 失败如实报错,不假出一张图。 Image-to-image · text-to-image · image-to-video · text-to-video: scan a workflow into a contract → double preflight (node existence + model files) → honest errors on failure, no fabricated output.


特性 · Features

工具注册名统一为 _dsh_external_dsh_comfyui_* 全名(harness 不做名字缩短,模型按注册名调用)。 Tool registration names are the full _dsh_external_dsh_comfyui_* (the harness does not shorten names; the model calls the registered names).

工具 Tool(注册名 Registration name) 说明 Description
_dsh_external_dsh_comfyui_list 连通状态 + 模板清单(media/mode/can/cannot + 用户写的 user_note)Connectivity + template list (media/mode plus user notes for the model)
_dsh_external_dsh_comfyui_inspect 单个模板的槽 / LoRA 坑 / prompt_style / user_note,query 搜模型文件名 One template's slots / LoRA pits / prompt style / user notes; query searches model filenames
_dsh_external_dsh_comfyui_generate 按合同填槽提交。遵守 user_note 与 prompt_style(自然语言 vs tag)。图/视频/音频只传本地路径 Submit by contract. Follow user notes and prompt style. Media inputs take local paths
_dsh_external_dsh_comfyui_job 查询 / 等待 / 取消任务;成品只返回磁盘路径 Query / wait / cancel jobs; outputs are disk paths
_dsh_external_dsh_comfyui_import 扫描 / 导入本地 API Format JSON 为新模板(默认只扫描不落盘)Scan / import a local API-format JSON as a template (preview-only by default)
_dsh_external_dsh_comfyui_lora LoRA 注册表:list / register / remove 触发词与用法注释(与设置页同一张表)LoRA registry: list/register/remove trigger words and usage notes (same table as Settings)

核心设计 · Core design

AI-first 合同制 · Contract-first, AI-blind to graphs

工作流 JSON(ComfyUI API Format,模型不可见)
      │ scanGraph():离线启发式 + 活体官方集合判定
      ▼
模板合同 templates/<id>.contract.json   ← 模型唯一可见物(槽/LoRA 坑/can/cannot/models)
      │ generate():填槽 → 尺寸对齐 8 → 别名/触发词 → 模型文件校验
      │             → 预检(/object_info 逐节点存在性 + 必填输入)→ POST /prompt
      ▼
成品 outputDir/<prompt_id>/(图/视频/音频)+ job 记录(查询/等待/取消)

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-revive 下一个 Next dsh-my-plugins →