wbb316/dsh-comfyui-image 预览 preview

wbb316/dsh-comfyui-image

DSH(DeepSeek Harness)的本地 ComfyUI 图片生成插件:一个 generate_image 工具覆盖文生图 / 图生图 / 局部重绘 / 去背景,参数有智能默认值、报错可照做;零第三方运行时依赖,附 doctor 自检与 88 项测试(自带 mock ComfyUI,无需真装)。Local ComfyUI image plugin for DSH — one generate_image tool with text2img / img2img / inpaint / remove-background modes.

Project Overview项目介绍

dsh-comfyui-image is a native Cordis plugin built specifically for the DeepSeek Harness (DSH) ecosystem, exposing a single Agent tool named generate_image that bridges a local ComfyUI server into DSH and gives the agent text-to-image, image-to-image, inpainting, and background-removal capabilities. The package declares dsh.engines.dsh >= 0.2.0-rc.1 and depends on DSH's tools registry; installation is performed with one command, dsh plugin --profile <profile> add github:wbb316/dsh-comfyui-image, which the README reports completes in roughly 21.6 seconds and ships 13 ready-to-run files under lib/ with no TypeScript build step required. Alternative mounts include pointing the DSH Settings → Plugins panel at a local link: path or hand-editing the active profile's package.json to add the dependency plus an entry in dsh.profile.bundles, followed by a restart.

The typical workflow is conversational: the user asks the agent to draw, for example, a corgi astronaut, and the plugin auto-infers the text2img mode, runs an SD1.5 checkpoint at 512×512 with seed 42 and dpmpp_2m/karras, then saves the PNG into the current project root and returns an absolute path that DSH can open directly. A matching .json sidecar stores every parameter and the exact ComfyUI workflow for later reproduction, and a custom extra_options.workflow_path token-substitution hook lets users swap in upscalers, outpainting, batch jobs, or any other custom graph without editing plugin source. It targets DSH users who want local image generation without third-party commercial APIs, plus creators who need reproducible prompt-to-image pipelines.

Requirements are Node.js ≥ 20 (only built-in fetch, FormData, and Blob are used, so the runtime carries zero third-party dependencies), a reachable ComfyUI instance (default http://127.0.0.1:8188), and at least one checkpoint under ComfyUI/models/checkpoints/; a CUDA-capable GPU accelerates but is not mandatory since CPU inference still completes. Background removal is the only mode needing extra ComfyUI custom nodes — any one of ComfyUI_essentials, ComfyUI-BRIA_AI-RMBG, ComfyUI-LayerStyle, or WAS Node Suite works, with pip install "rembg[cpu]" explicitly required to avoid the missing onnxruntime trap. Config edits in config.json apply immediately without restarting DSH, existing files are never overwritten (-1, -2 suffixes are appended automatically), the test suite contains 88 cases with a mock ComfyUI that performs real PNG encoding and polling, and the project is released under the MIT license. The plugin is not yet published to npm, so the GitHub shorthand is the only registry-based install path.

dsh-comfyui-image 是一个面向 DeepSeek Harness(DSH)的原生 Cordis 插件,仅暴露一个 Agent 工具 generate_image,把本地 ComfyUI 服务接入 DSH,让 Agent 具备文生图、图生图、局部重绘、背景移除四种能力。插件遵循 dsh.engines.dsh >= 0.2.0-rc.1 引擎声明,依赖 DSH 的 tools 注册表,按 dsh plugin --profile add github:wbb316/dsh-comfyui-image 一条命令从 GitHub 安装(实测 21.6 秒装完,13 个 lib 文件可直接运行),也可本地 link 或手改 profile 的 package.json 注册进 dsh.profile.bundles,装完重启 DSH 即生效。

典型使用流程是:用户用一句话告诉 Agent「生成一张柯基宇航员的图」,插件自动推断 text2img 模式、走 SD1.5 底模出图,落盘到当前项目根目录并返回绝对路径供 DSH 直接点开。配套的 docs/preview.png 与同名 .json sidecar 可复现整套参数;每个图旁还写一份含完整参数与 ComfyUI 工作流的元数据文件。它适合需要让本地 Agent 直接出图、又不想调外部商业 API 的开发者和创作者,也支持通过 extra_options.workflow_path 接入超分、扩图、批量等自定义工作流。

依赖上要求 Node.js ≥ 20(仅用内置 fetch、FormData、Blob,运行时零第三方依赖)、本地 ComfyUI 服务(默认 http://127.0.0.1:8188,models/checkpoints 至少放一个 .safetensors 底模);背景移除是唯一额外依赖,需要装 ComfyUI_essentials、ComfyUI-BRIA_AI-RMBG、ComfyUI-LayerStyle 或 WAS Node Suite 任一套并注意 pip install "rembg[cpu]"。配置变更立即生效无需重启 DSH,已存在文件自动加 -1/-2 后缀绝不覆盖。许可证为 MIT,目前未发布到 npm。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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:wbb316/dsh-comfyui-image

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

READMEREADME

dsh-comfyui-image

English | 简体中文

CI Release License Node

给 DeepSeek Harness(DSH)补上图片生成能力的插件:后端接本地 ComfyUI, 对外只暴露一个 Agent 工具 generate_image —— 文生图、图生图、局部重绘、背景移除四合一。 不依赖任何外部商业 API,运行时零第三方依赖(只用 Node 内置的 fetch / FormData)。

一句话用法:装好 ComfyUI、启用插件,然后对 Agent 说「生成一张柯基宇航员的图」就行。

效果示例:柯基宇航员(本插件 + 本地 ComfyUI 实际出图)

上图就是照着上面这句话出的:text2img、SD1.5 底模、512×512、seed 42、dpmpp_2m/karras —— 图与复现参数都在仓库里(docs/preview.png + 同名 .json sidecar)。


目录


它解决什么问题

DSH 本身没有出图能力,而 Agent 又经常需要「画一张图」。本插件把本地 ComfyUI 接进来:

  • Agent 侧:只多了一个工具 generate_image,参数少、有默认值、报错能指导下一步;
  • 用户侧:图直接落到当前项目根目录,返回的绝对路径在 DSH 里可以直接点开;
  • 运维侧:ComfyUI 地址 / 底模 / 默认参数都在配置文件里,改完立即生效,不用重启 DSH。

功能一览

模式 mode 输入 干什么 备注
text2img prompt 文生图 只有这个模式吃 width / height
img2img prompt + input_image 图生图 / 整体重绘 strength 默认 0.6
inpaint prompt + input_image + mask_image 局部重绘 遮罩白/亮区 = 要重绘的区域;strength 默认 1.0
remove_background input_image 背景移除 需要 ComfyUI 装第三方去背节点(见下)

其他能力:

  • 不传 mode 会自动推断,规则只有三条,见模式推断;
  • 绝不覆盖已有文件:目标已存在就自动加 -1 / -2 后缀;
  • 每张图旁边写一份 .json 元数据 sidecar(含完整参数与提交给 ComfyUI 的工作流),可复现、可排查;
  • remove_background 会在四套已核实的第三方去背方案里择优(ComfyUI_essentials / ComfyUI-BRIA_AI-RMBG / ComfyUI-LayerStyle / WAS Node Suite),一套都没有时列出「装什么、怎么装」;
  • 想跑 V1 没内置的东西(扩图 / 超分 / 批量),用 extra_options.workflow_path 接自己的工作流。

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

← 上一个 Prev canon 下一个 Next dsh-infinite-context →