wbin0001/dsh-comfyui-canvas ↗★ 3
dsh-comfyui-canvas
Give DeepSeek Harness agents live control of your ComfyUI canvas (local or cloud): embed it as a split-screen tab, then read/edit/run workflows, debug errors, fetch output images, and batch-sweep parameters straight from the chat. Ships the ComfyUI-side bridge node.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wbin0001/dsh-comfyui-canvas说明文档
阅读完整 README ↗Usage
- Open a conversation, switch to the ComfyUI tab — the canvas splits on the left, chat on the right.
- Ask the agent to do canvas work: "读取当前工作流", "给 KSampler 设 seed 为 42", "检查画布有没有报错", "运行一次".
- The agent reads
comfyui_configfirst, so it knows it's on the canvas and stays focused on canvas operations.
Conversation → canvas
Content the agent generates in the chat — images and text — can become ComfyUI workflow node inputs directly, closing the loop from conversation idea to canvas output:
comfyui_attach_image: upload a local image into ComfyUI'sinput/and optionally point a LoadImage node at it. Uses ComfyUI's native/upload/image(not the bridge) — the host reads and uploads the file from the agent's own machine, which matters when the DSH machine and the ComfyUI machine differ (cloud deployments).comfyui_inject_text: write text to a node's widget; or create a new source node, set its value, and connect it to a target input — "conversation text as a wirable source". A one-step wrapper overadd_node + set_param + connect;set_paramalone suffices when only an existing widget changes, andinject_textis for "create a new source and wire it".comfyui_export_api: export the live canvas as API-format workflow JSON (the format/promptand comfy-clirun_workflowconsume), bridging canvas → MCP headless runs.
Architecture boundary: file transfer (image →
input/) goes through the host + native API; canvas node ops go through bridge commands; reading results goes through native/history+/view— three layers that never mix.
Canvas vs MCP — two ways to drive ComfyUI
This plugin is the canvas driver: it sees and edits the live canvas the user is looking at (add nodes, wire links, tweak widgets, run, fetch the run's output images via comfyui_get_outputs, sweep parameters via comfyui_batch_run). It never needs a saved workflow file.
For pipeline-style / headless workloads, ComfyUI's official Comfy CLI (comfy-cli) is a complementary tool. It is a standalone Python CLI (installed via pip install comfy-cli, and can also expose an MCP server) — not a DSH plugin, so it is used separately from this plugin rather than mounted into the DSH profile. It covers capabilities this canvas plugin deliberately does not re-implement:
| Capability | This plugin (canvas) | ComfyUI CLI (comfy-cli) |
|---|---|---|
| Operate the live canvas the user sees | ✅ | — |
| Run a saved / API-format workflow file | ✅ (via canvas) | ✅ (directly) |
| Batch-queue runs + fetch output images | ✅ (batch_run + get_outputs) | ✅ (run_workflow + fetch_outputs) |
| Official workflow templates | — | ✅ (templates) |
| Model download / management | — | ✅ (models) |
| Hosted/paid models (Flux, Veo, …) | — | ✅ (partner) |
Pre-flight graph validation (validate / deps) | ✅ (debug, local) | ✅ (validate, server) |
Recommended split: use this plugin while you are building/tuning a workflow on the canvas; use the Comfy CLI once you want to run the same graph headlessly at scale (batch pipelines, templates, model management, hosted models). They talk to the same ComfyUI instance and can be used side by side. Install the Comfy CLI with:
pip install comfy-cli # standalone CLI, not a DSH plugin — see https://github.com/Comfy-Org/comfy-cli