dsh-image-gen README

The project's README from github.com/shanliuling/dsh-image-gen. As one markdown file: README.md.

dsh-image-gen 中文功能概览

简体中文 · English

🎨 dsh-image-gen

DeepSeek Harness 的原生 AI 图像创作套件

对话生图与编辑 · Studio 批量创作 · 多模型对比 · 500+ Prompt 灵感 · 图库管理 · 本地 ComfyUI

npm version npm downloads CI DSH Insights health GitHub stars License: MIT LINUX DO

快速开始 · 核心能力 · Provider 支持 · 常见问题


为 DeepSeek Harness 带来完整的 AI 图像创作工作流。

dsh-image-gen 不只是简单的对话生图,而是为 DSH 补齐了从自然语言连续修图、Studio 批量创作、多模型横向对比,到 500+ Prompt 灵感库与本地 ComfyUI 的全流程能力。支持 Google Gemini、OpenAI Images / Compatible、ByteDance Seedream、Aliyun DashScope、xAI Grok Imagine、智谱 GLM-Image 及本地私有化工作流,采用 BYOK(自带 Key)模式,生成结果支持按工作区隔离存储。

pnpm dsh plugin --profile web add dsh-image-gen@latest

版本更新提示: 本次版本变化较大,老用户请更新至最新版本。

dsh-image-gen 完整 AI 图像创作工作流

一个插件,四种创作方式

入口 最适合 你可以做什么
💬 对话 让 Agent 理解自然语言需求 文生图、图生图、多图参考、连续编辑、原位重新生成
🎛️ 工作台 精确控制创作参数 批量生成、多张参考图、高级画布
✨ 灵感 找构图、风格与 Prompt 500+ 案例、搜索筛选、收藏、复制、一键带入工作台
🖼️ 图库 整理与复用生成结果 搜索、筛选、收藏、重新生成、下载、批量管理、工作区隔离

快速开始

1. 安装插件

环境要求:DeepSeek Harness 稳定版本,Node.js ^22.19.0 或 >= 24.0.0。

在你的 DeepSeek Harness 项目根目录下运行:

pnpm dsh plugin --profile web add dsh-image-gen@latest

💬 极客提示:你也可以直接把这句话发送给 DSH 对话中的 Agent:
帮我安装生图插件,在终端执行:pnpm dsh plugin --profile web add dsh-image-gen@latest

其他安装方式(全局 / GitHub 直装 / 本地调试)
# 若已将 dsh 安装为系统全局命令:
dsh plugin --profile web add dsh-image-gen@latest

# 从 GitHub 仓库直接安装最新代码:
pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git

# 本地克隆源码开发安装:
git clone https://github.com/shanliuling/dsh-image-gen.git
pnpm dsh plugin --profile web add ./dsh-image-gen

2. 配置 Provider

重启 DSH 后进入:

设置 → 插件 → 插件配置 → 图像生成

选择 Provider,填写自己的 API Key,并按需调整模型、Endpoint / Base URL 与工作区保存选项。填好 Key 后可点击**「测试连接」验证可用性,或点击「拉取模型」**一键获取该厂商支持的全部生图模型,无需手动查文档。使用 ComfyUI 时,请填写 DSH Host 可访问的服务地址,并导入 API Format Workflow JSON。

3. 开始创作

在聊天框中直接描述你想要的图片:

画一张雨夜霓虹街头的赛博朋克猫咪,电影感光线,16:9。

也可以直接上传参考图,让 Agent 进行风格重构或局部编辑:

保持角色与构图不变,给猫咪戴上一副黑色墨镜。

DSH 插件配置界面 对话生图与风格重构效果
左:Provider 配置 · 右:在 DSH 对话中直接生图、图生图与连续编辑。

需要更细的参数控制时,点击会话顶部的 画廊 入口,进入 图库 / 工作台 / 灵感 / 收藏。


核心能力

💬 对话生图、编辑与版本切换


图片正在重新生成 在同一图片卡片中切换生成版本
修改 Prompt 后原位重新生成,并在同一张图片卡片中切换历史版本。

🎛️ Studio 批量创作


dsh-image-gen Studio 工作台
在同一个 Studio 中完成参考图导入、参数控制、批量生成、结果筛选与保存。

⚖️ 多模型横向对比

使用同一组 Prompt 和参考图并发调用多个模型,在一张画布中比较并保存结果。


同一 Prompt 的多模型生成对比
在同一画布中比较不同模型结果,再批量保存满意的图片。

✨ 500+ Prompt 灵感案例


Prompt 灵感素材库
先找灵感,再把 Prompt 带入工作台;全本地缓存,浏览或复制不消耗生成额度。

🖼️ 图库、收藏与批量管理


图库筛选、收藏与批量管理
图库支持多维度筛选、收藏、批量管理与工作区数据隔离。

🧩 本地 ComfyUI 多工作流

灵活调用本地 GPU 算力,让私有化绘图无缝融入 Agent 对话。

ComfyUI 暂未接入 Studio 和多模型对比。


ComfyUI 多工作流配置
为不同用途维护独立工作流,并通过名称让 Agent 精确选择。


Provider 支持情况

Provider 对话生图 对话编辑 Studio 多模型对比
Google Gemini ✅ ✅ 多图 ✅ ✅
OpenAI Images ✅ ✅ 多图 ✅ ✅
OpenAI Compatible(中转站) ✅ ✅ 多图 ✅ ✅
ByteDance Seedream / 火山方舟 ✅ ✅ 多图 ✅ ✅
Aliyun DashScope / Qwen Image ✅ ✅ 多图 ✅ ✅
xAI Grok Imagine ✅ ⚠️ 有限 ✅ ✅
智谱 GLM-Image ✅ — ✅ ✅
Local ComfyUI ✅ ✅ 单图 — —

Studio 与多模型对比目前只支持云端 Provider;多模型对比调用的是各 Provider 在设置中已配置的模型。 智谱 GLM-Image 上游本身不支持图生图;xAI 图生图走 OpenAI 兼容协议(multipart),部分网关可能需等待后续适配。

当前默认模型与 Endpoint(均可修改)
Provider 默认模型 默认 Endpoint / Base URL
Google Gemini gemini-3.1-flash-image https://generativelanguage.googleapis.com/v1beta/interactions
OpenAI Images gpt-image-2 https://api.openai.com/v1
OpenAI Compatible 自定义 自定义 Base URL
ByteDance Seedream doubao-seedream-5-0-260128 https://ark.cn-beijing.volces.com/api/v3
Aliyun DashScope qwen-image-3.0 https://dashscope.aliyuncs.com/api/v1
xAI Grok Imagine grok-imagine-image https://api.x.ai/v1
智谱 GLM-Image glm-image https://open.bigmodel.cn/api/paas/v4
Local ComfyUI 用户导入的 API Workflow http://127.0.0.1:8188

数据与隐私

常见问题

安装后找不到“图像生成”设置怎么办?

先完全重启当前 DSH Profile,再检查插件配置:

dsh --profile web --dump-config

如果输出中没有 dsh-image-gen,请重新执行安装命令。提交 Issue 时请附 DSH 版本、插件版本和错误日志,不要上传 API Key。

生成图片保存在哪里?

开启“保存到工作区”后,对话生成结果默认保存在当前工作区的 dsh-image-gen/ 子目录,也可以在设置中修改。Studio 候选图先留在临时画布,只有用户选中的结果才会进入图库并保存。

为什么 ComfyUI 没有出现在 Studio 中?

当前 Studio 与多模型对比仅支持云端 Provider,暂未接入 ComfyUI。ComfyUI 已支持在 Agent 对话中进行文生图、单图编辑以及多个命名工作流。

从图库删除会删除聊天记录吗?

不会。删除图库记录不会修改原聊天消息。你可以额外选择是否清理工作区中的本地图片文件;文件删除通常无法恢复,请确认后操作。

如何升级?
pnpm dsh plugin --profile web add dsh-image-gen@latest

升级后重启对应的 DSH Profile。


本地开发

git clone https://github.com/shanliuling/dsh-image-gen.git
cd dsh-image-gen

pnpm install
pnpm run typecheck
pnpm test
pnpm run build
pnpm run pack:check

欢迎通过 Issues 反馈问题,或阅读 CONTRIBUTING.md 后提交 Pull Request。

License

本项目基于 MIT License 开源。

如果 dsh-image-gen 对你的工作流有所帮助,欢迎在 GitHub 点亮一颗 ⭐ Star 支持持续维护。

查看 Releases · 提交 Issue · 参与贡献

dsh-image-gen (shanliuling/dsh-image-gen)

Searching Database…

What is this?dsh-image-gen is the native AI image creation plugin for DeepSeek Harness (DSH). It brings chat-based image generation and editing, a batch Studio, multi-model comparison, a library of 500+ prompts, a gallery manager, and local ComfyUI workflows directly into DSH conversations.
Is this a standalone app, or does it plug into something else?It's not standalone — it's a plugin you install inside an existing DeepSeek Harness (DSH) project, and it runs through DSH's chat agent and settings UI rather than as its own app.
How do I install and set it up?Install it with `pnpm dsh plugin --profile web add dsh-image-gen@latest` from your DSH project root, restart DSH, then configure a provider under Settings -> Plugins -> Plugin Config -> Image Generation, where you can test the connection or auto-pull available models.
What do I need before installing it?A stable DSH release and Node.js ^22.19.0 or >=24.0.0 are required. Image generation itself is BYOK, so you supply your own API key for whichever provider you pick (Gemini, OpenAI, Seedream, DashScope, Grok Imagine, GLM-Image) or point it at your own ComfyUI server.
What doesn't work yet?Studio and side-by-side multi-model comparison currently only support cloud providers — local ComfyUI isn't wired into either yet. GLM-Image also doesn't support image-to-image, and xAI's image editing goes through an OpenAI-compatible multipart endpoint some gateways may not fully support.
What can I do with the 500+ prompt library?Browse and filter over 500 curated prompt examples, favorite or copy any of them, and send one straight into Studio. Images in this library are cached locally, so browsing or copying doesn't cost tokens or generation quota.
How does multi-model comparison work?The same prompt and reference images are sent to several configured providers at once, and the results land side by side on one canvas so you can compare and save only the ones you like.
Where do my generated images actually get saved?With workspace saving on, chat-generated images land in a dsh-image-gen/ folder inside the current workspace. Studio keeps candidates on a temporary canvas and only moves the ones you explicitly pick into the gallery.
What can the local ComfyUI integration do?You can import and name multiple ComfyUI API workflows with preset prompts and placeholders, and the Agent picks the right one by name to run text-to-image or single-image editing on your own GPU — it just isn't hooked into Studio or multi-model comparison yet.
Size
24.7 MB
Stars
626
Age
2mo
Commits · 90 Days