NinjaSln-labs/dsh-imgdraw ↗★ 0
dsh-imgdraw
Text-to-image for DeepSeek Harness: a `draw_image` model tool, an input-bar 生图 button with a prompt popup (async generation, 4-grid results, download / keep / delete), an /imgdraw image route, and persisted history. Backends: DashScope wan2.7-image (free default) and SiliconFlow Qwen-Image.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:NinjaSln-labs/dsh-imgdraw说明文档
阅读完整 README ↗配置(cordis.patch.yml / profile overlay,均可选)
| 字段 | 默认 | 说明 |
|---|---|---|
outDir | ~/.dsh/imgdraw | 图片输出目录 |
keysPath | ~/.dsh/image-api-keys.json | API keys JSON(dashscope / siliconflow 字段) |
routePrefix | /imgdraw | 图片路由前缀(无尾斜杠) |
rpcPath | /imgdraw-rpc | 浏览器 JSON RPC 路由 |
keepLatest | 24 | 每轮清理后保留的最新文件数(选定保留的文件永不清理) |
maxCount | 4 | 单次最大生成数量 |
defaultBackend | dashscope | 默认后端:dashscope(百炼 wan2.7-image 免费)或 siliconflow(Qwen-Image) |
dashscopeModel | wan2.7-image | 百炼模型 |
siliconflowModel | Qwen/Qwen-Image | SiliconFlow 模型 |
historyCap | 50 | 历史记录条数上限(index.json 最多保留的 job 数) |
示例:
- id: imgdraw
name: 'dsh-imgdraw'
config:
keepLatest: 40
defaultBackend: 'dashscope'
使用
- 模型工具:
draw_image(prompt / count / size / backend / tag)——同步等待生成,返回/imgdraw/列表。 - 浏览器:输入框左侧「🎨 生图」→ 弹窗填提示词(可一键填入 Sin v10 头像模板)→ 生成 → 4 格网格预览 → 下载 / 保留 / 删除;「最近生成」历史跨重启持久化(
~/.dsh/imgdraw/index.json)。 - 直链:
http://127.0.0.1:3080/imgdraw/。