dsh-tool-generate-image

by soli0x4ea

0 视觉与多模态github未核验到 manifest收录于 08-16

本地绘图工具 — 给 DeepSeek Harness 的主模型一支「画笔」:把文字描述增强为提示词(正面 + 负面),调用本地 Draw Things (Stable Diffusion WebUI 兼容 HTTP 服务),生成图片并保存,返回文件路径。

A local drawing tool — hands the DeepSeek Harness main model a paintbrush: enhances a text description into prompts (positive + negative), calls local Draw Things (a Stable Diffusion WebUI-compatible HTTP service), generates and saves the image, and returns the file path.

安装

dsh plugin --profile web add github:soli0x4ea/dsh-tool-generate-image

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

本地绘图工具 — 给 DeepSeek Harness 的主模型一支「画笔」:把文字描述增强为提示词(正面 + 负面),调用本地 Draw Things(Stable Diffusion WebUI 兼容 HTTP 服务),生成图片并保存,返回文件路径。

全程本地(127.0.0.1)——生成不出网,配合微信桥接可用 MEDIA: 指令把图直接发给用户。

License: MIT DeepSeek Harness

功能

  • 描述 → prompt 增强(自动追加质量词;负面提示词内置,可覆盖);
  • 调用 Draw Things /sdapi/v1/txt2img(SD WebUI 兼容);
  • 图片保存到输出目录(默认 ~/Documents/DSH/generated-images),返回路径;
  • 尺寸 / 步数 / 负面词全部可配置或按次传参。

依赖

  • Draw Things(macOS)已安装,并在设置中开启 HTTP Server(默认端口 7860)。
  • 本包依赖 DSH workspace 包(@deepseek-ai/cordis 等),通过 file: 链接本地 DSH 仓库(见 package.json)。

挂载

- insert:
    - id: tool-generate-image
      name: '@deepseek-ai/dsh-tool-generate-image'

配置

字段 默认 说明
baseURL http://127.0.0.1:7860 Draw Things HTTP 端点
outputDir ~/Documents/DSH/generated-images 图片输出目录
timeoutMs 180000 生成超时
promptBoost 质量词后缀 追加在用户描述后的正面词
negativePrompt 内置负面词 默认负面提示词
defaultSize / defaultSteps 512 / 20 默认尺寸与步数

工具

generate_image:prompt(必填,画面描述)+ 可选 width / height / steps / negative_prompt → 返回图片文件路径。

开发

pnpm install
pnpm run typecheck
pnpm run build   # tsc 类型 + tsdown bundle → lib/

License

MIT © 2026 soli0x4ea

原始 README: https://github.com/soli0x4ea/dsh-tool-generate-image/blob/main/README.md ↗