dsh-image-gen 0.10.1 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.en.md +456 -454
  2. package/README.md +456 -454
  3. package/docs/assets/readme/canvas-edit.webp +0 -0
  4. package/docs/assets/readme/canvas-sketch.webp +0 -0
  5. package/docs/assets/readme/chat-batch.webp +0 -0
  6. package/docs/assets/readme/config.webp +0 -0
  7. package/docs/assets/readme/hero-batch.webp +0 -0
  8. package/docs/assets/readme/hero-canvas.webp +0 -0
  9. package/docs/assets/readme/studio-ref.webp +0 -0
  10. package/docs/assets/readme/studio.webp +0 -0
  11. package/lib/client.js +4871 -3658
  12. package/lib/index.js +2122 -159
  13. package/lib/types/client/browser-image-utils.d.ts +6 -0
  14. package/lib/types/client/datalist-scroll-fix.d.ts +32 -0
  15. package/lib/types/client/gallery-batch-bar.d.ts +8 -0
  16. package/lib/types/client/gallery-card.d.ts +21 -0
  17. package/lib/types/client/gallery-format.d.ts +7 -0
  18. package/lib/types/client/gallery-i18n.d.ts +236 -0
  19. package/lib/types/client/gallery-media.d.ts +46 -0
  20. package/lib/types/client/gallery-merge.d.ts +15 -0
  21. package/lib/types/client/gallery-store.d.ts +21 -2
  22. package/lib/types/client/gallery-thumbs.d.ts +24 -0
  23. package/lib/types/client/gallery-view.d.ts +0 -207
  24. package/lib/types/client/image-result-view.d.ts +24 -0
  25. package/lib/types/client/index.d.ts +1 -20
  26. package/lib/types/client/plugin-i18n.d.ts +375 -0
  27. package/lib/types/client/plugin-style.d.ts +1 -0
  28. package/lib/types/client/studio-helpers.d.ts +63 -0
  29. package/lib/types/client/studio-style.d.ts +1 -1
  30. package/lib/types/client/studio-view.d.ts +0 -7
  31. package/lib/types/client/tl/gallery-image-transfer.d.ts +1 -1
  32. package/lib/types/config.d.ts +12 -0
  33. package/lib/types/import-route.d.ts +11 -0
  34. package/lib/types/multipart.d.ts +29 -0
  35. package/lib/types/openai-compatible.d.ts +8 -0
  36. package/lib/types/request-cache.d.ts +41 -0
  37. package/lib/types/shared.d.ts +23 -0
  38. package/lib/types/storage-stats.d.ts +34 -0
  39. package/lib/types/subscription/subscription-route.d.ts +2 -1
  40. package/lib/types/thumb-route.d.ts +25 -0
  41. package/lib/types/vault-registry.d.ts +36 -0
  42. package/lib/types/vault-route.d.ts +8 -0
  43. package/lib/types/vault-store.d.ts +31 -0
  44. package/lib/types/web-route.d.ts +4 -0
  45. package/lib/types/zip-progress.d.ts +18 -0
  46. package/lib/types/zip-route.d.ts +25 -0
  47. package/lib/types/zip-stream.d.ts +43 -0
  48. package/package.json +139 -139
  49. package/skills/install-dsh-image-gen/SKILL.md +22 -22
  50. package/lib/types/client/tl/tl-trace-bridge.d.ts +0 -55
  51. package/lib/types/client/tl/trace-playback.d.ts +0 -101
  52. package/lib/types/trace-drawing.d.ts +0 -102
  53. package/lib/types/trace-route.d.ts +0 -12
  54. package/lib/types/trace-sketch.d.ts +0 -26
  55. package/lib/types/trace-store.d.ts +0 -23
  56. package/lib/types/vendor/drawai/raster.d.ts +0 -43
  57. package/lib/types/vendor/drawai/trace-image.d.ts +0 -257
package/README.en.md CHANGED
@@ -1,454 +1,456 @@
1
- <div align="center">
2
-
3
- <img src="docs/assets/readme/hero-en.webp" alt="dsh-image-gen feature overview" width="100%" />
4
-
5
- <br />
6
-
7
- <p><a href="README.md">简体中文</a> · <strong>English</strong></p>
8
-
9
- # 🎨 dsh-image-gen
10
-
11
- ### Native AI image creation suite for DeepSeek Harness
12
-
13
- <p><b>AI Creative Canvas · In-chat generation and editing · Studio batch creation · Multi-model comparison · 500+ prompt inspirations · Gallery management · Local ComfyUI · Subscription no-key</b></p>
14
-
15
- <p>
16
- <a href="https://www.npmjs.com/package/dsh-image-gen"><img src="https://img.shields.io/npm/v/dsh-image-gen?style=flat-square&color=4f6ef7" alt="npm version" /></a>
17
- <a href="https://www.npmjs.com/package/dsh-image-gen"><img src="https://img.shields.io/npm/dm/dsh-image-gen?style=flat-square&color=10b981" alt="npm downloads" /></a>
18
- <a href="https://github.com/shanliuling/dsh-image-gen/actions/workflows/ci.yml"><img src="https://github.com/shanliuling/dsh-image-gen/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
19
- <a href="https://dsh-insights.com/p/shanliuling/dsh-image-gen"><img src="https://dsh-insights.com/badge/shanliuling/dsh-image-gen.svg" alt="DSH Insights health" /></a>
20
- <a href="https://github.com/shanliuling/dsh-image-gen/stargazers"><img src="https://img.shields.io/github/stars/shanliuling/dsh-image-gen?style=flat-square" alt="GitHub stars" /></a>
21
- <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-f5c542?style=flat-square" alt="License: Apache-2.0" /></a>
22
- <a href="https://linux.do/"><img src="https://img.shields.io/badge/LINUX%20DO-Community-555?style=flat-square" alt="LINUX DO" /></a>
23
- </p>
24
-
25
- <p>
26
- <a href="https://atomgit.com/shanliuling/dsh-image-gen"><img src="https://atomgit.com/shanliuling/dsh-image-gen/star/new_badge.svg" alt="AtomGit" height="55" /></a>
27
- </p>
28
-
29
- <p>
30
- <a href="#quick-start">Quick Start</a> ·
31
- <a href="#core-capabilities">Core Capabilities</a> ·
32
- <a href="#provider-support">Provider Support</a> ·
33
- <a href="#faq">FAQ</a>
34
- </p>
35
-
36
- <br />
37
-
38
- <img src="docs/assets/readme/canvas-generate.webp" alt="Sketching on the infinite canvas and generating a final image through conversation" width="46%" />
39
- <img src="docs/assets/readme/canvas-edit.webp" alt="Continuing to edit and iterate through conversation based on existing results" width="46%" />
40
- <br />
41
- <sub>Left: Sketch and place reference images on the canvas, then generate through conversation. · Right: Keep iterating on existing results through conversation.</sub>
42
-
43
- <br />
44
-
45
- <img src="docs/assets/readme/chat-generate.webp" alt="Generating images directly in conversation" width="46%" />
46
- <img src="docs/assets/readme/other-features.webp" alt="Studio batch creation, inspiration library, gallery and more" width="46%" />
47
- <br />
48
- <sub>Left: Describe and generate images right in the conversation. · Right: Studio batch creation, inspiration library, gallery, and more.</sub>
49
-
50
- </div>
51
-
52
- **A complete AI image creation workflow for DeepSeek Harness.**
53
-
54
- `dsh-image-gen` goes far beyond basic in-chat image generation. It brings **in-chat generation with continuous editing**, an **AI creative canvas**, **Studio batch creation**, **side-by-side multi-model comparison**, a **prompt inspiration library**, and **local ComfyUI** workflows into DSH.
55
-
56
- It supports mainstream cloud image models and private local workflows, works with BYOK (bring your own key) or subscription accounts, and can isolate generated assets by workspace.
57
-
58
- > **Already paying for ChatGPT, Grok, or Google? Just sign in and start generating—no separate API key purchase needed.**
59
-
60
- Supports: Gemini · OpenAI / Compatible · Seedream · DashScope · Grok Imagine · GLM-Image · Local ComfyUI
61
-
62
- ```bash
63
- pnpm dsh plugin --profile web add dsh-image-gen@latest
64
- ```
65
-
66
- > **Update notice:** This release includes major changes. Existing users should update to the latest version.
67
-
68
- <img src="docs/assets/readme/workflow-overview-en.webp" alt="dsh-image-gen complete AI image creation workflow" width="100%" />
69
-
70
- ---
71
-
72
- ## One plugin, the complete AI image creation workflow
73
-
74
- | Entry | Best for | What you can do |
75
- | :--- | :--- | :--- |
76
- | 💬 **Chat** | Expressing ideas quickly | Text-to-image, image-to-image, continuous editing, and revision iteration |
77
- | ✏️ **Canvas** | Expressing visual creativity | Sketch-to-image, reference composition, spatial creation, and continuous refinement |
78
- | 🎛️ **Studio** | Fine-grained control over creation parameters | Batch generation, multi-image reference, and advanced parameter tuning |
79
- | ✨ **Inspiration** | Finding creative direction | Prompt examples, style exploration, and one-click reuse |
80
- | 🖼️ **Gallery** | Managing generated results | Search, favorite, download, and reuse |
81
-
82
- ---
83
-
84
- ## Quick Start
85
-
86
- ### 1. Install the plugin
87
-
88
- Requirements: DeepSeek Harness stable version, Node.js `^22.19.0` or `>= 24.0.0`.
89
-
90
- Run this command from your DeepSeek Harness project root:
91
-
92
- ```bash
93
- pnpm dsh plugin --profile web add dsh-image-gen@latest
94
- ```
95
-
96
- > 💬 **Power-user tip:** You can also send this directly to the Agent in a DSH chat:<br />
97
- > `Install the image generation plugin by running this command in the terminal: pnpm dsh plugin --profile web add dsh-image-gen@latest`
98
-
99
- <details>
100
- <summary><strong>Alternative installation methods (global / GitHub / local development)</strong></summary>
101
-
102
- ```bash
103
- # If dsh is installed globally:
104
- dsh plugin --profile web add dsh-image-gen@latest
105
-
106
- # Install the latest source directly from GitHub:
107
- pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
108
-
109
- # Clone the repository and install it for local development:
110
- git clone https://github.com/shanliuling/dsh-image-gen.git
111
- pnpm dsh plugin --profile web add ./dsh-image-gen
112
- ```
113
-
114
- </details>
115
-
116
- ### 2. Configure a Provider
117
-
118
- After restarting DSH, click the **Plugins** icon in the left sidebar, then click **dsh-image-gen** under **Installed** — the Image Generation settings form lives on the plugin's detail page:
119
-
120
- **Plugins panel → Installed → dsh-image-gen**
121
-
122
- <div align="center">
123
- <img src="docs/assets/readme/plugins-entry.webp" alt="Click Plugins in the left sidebar, then dsh-image-gen under Installed" width="100%" />
124
- <br />
125
- <sub>Click the Plugins icon in the left sidebar, then dsh-image-gen under Installed to open its detail page.</sub>
126
- </div>
127
-
128
- > DSH 0.1.5 and earlier have no Plugins panel; the entry there is **Settings → Plugins → Plugin Configuration → Image Generation**. The same plugin build supports both.
129
-
130
- Choose a Provider, enter your API key, and adjust the model, Endpoint / Base URL, and workspace-save options as needed. Once the key is stored, click **Test connection** to verify it, or **Fetch models** to pull every image-capable model the provider offers—no manual lookups needed. For ComfyUI, enter an address reachable by the DSH Host and import an **API Format Workflow JSON** file.
131
-
132
- Already paying for ChatGPT, Grok, or Google? No API key needed: expand the matching subscription Provider row, click **Sign in** and complete the authorization in your browser, then start generating (and editing) right away.
133
-
134
- ### 3. Start creating
135
-
136
- Describe the image you want directly in chat:
137
-
138
- ```text
139
- Create a cinematic cyberpunk cat on a neon street at night, 16:9.
140
- ```
141
-
142
- You can also upload a reference image directly for style transfer or editing:
143
-
144
- ```text
145
- Keep the character and composition unchanged, then add black sunglasses to the cat.
146
- ```
147
-
148
- <br />
149
-
150
- <div align="center">
151
- <img src="docs/assets/readme/plugin-detail.webp" alt="Provider settings form on the dsh-image-gen detail page" width="46%" />
152
- <img src="docs/assets/readme/chat-example.webp" alt="Chat generation and editing example" width="46%" />
153
- <br />
154
- <sub>Left: Provider settings on the plugin detail page · Right: In-chat generation, editing, and continuous refinement.</sub>
155
- </div>
156
-
157
- <br />
158
-
159
- For more precise parameter control, open **Gallery** from the conversation header, then switch between **Gallery / Studio / Inspiration / Favorites**.
160
-
161
- ---
162
-
163
- ## Core Capabilities
164
-
165
- ### 💬 In-chat generation, editing, and revision switching
166
-
167
- - Use natural language for text-to-image, image-to-image, multi-image reference, and style transfer.
168
- - Edit the original prompt to regenerate, then switch between revisions on the same image card.
169
-
170
- <br />
171
-
172
- <div align="center">
173
- <img src="docs/assets/readme/regenerating.webp" alt="Image regeneration in progress" width="46%" />
174
- <img src="docs/assets/readme/revision-switcher.webp" alt="Switching between generated revisions on the same image card" width="46%" />
175
- <br />
176
- <sub>Regenerate in place after editing the prompt, then switch between previous results on the same image card.</sub>
177
- </div>
178
-
179
- <br />
180
-
181
- ### ✏️ From sketch to image: AI creative canvas
182
-
183
- Express your ideas on an infinite canvas and turn drafts, compositions, and thoughts into real images through conversation.
184
-
185
- - Freely sketch, add reference materials, and organize your ideas on the canvas.
186
- - Drag images from Recent generations or the Gallery onto the canvas, or click Send to canvas on a thumbnail. Open the infinite canvas and wait for the image to load first; repeated imports of the same history item are deduplicated.
187
- - Talk to the AI in natural language to turn a draft into a finished piece.
188
- - Keep editing, refining, and exploring new directions from existing results—your creative process is preserved so every exploration stays iterable.
189
-
190
- <br />
191
-
192
- <div align="center">
193
- <img src="docs/assets/readme/canvas-generate.webp" alt="Sketching on the infinite canvas and generating a final image through conversation" width="46%" />
194
- <img src="docs/assets/readme/canvas-edit.webp" alt="Continuing to edit and iterate through conversation based on existing results" width="46%" />
195
- <br />
196
- <sub>Left: Sketch and place reference images on the canvas, then generate through conversation. · Right: Keep iterating on existing results through conversation.</sub>
197
- </div>
198
-
199
- <br />
200
-
201
- ### 🎛️ Studio batch creation
202
-
203
- - Support multiple reference images, and generate multiple candidates at a time.
204
- - Control the Provider, model, aspect ratio, and quality, then save only the results you want.
205
-
206
- <br />
207
-
208
- <div align="center">
209
- <img src="docs/assets/readme/studio-workbench.webp" alt="dsh-image-gen Studio workbench" width="100%" />
210
- <br />
211
- <sub>Import references, control parameters, generate batches, select results, and save—all within one Studio.</sub>
212
- </div>
213
-
214
- <br />
215
-
216
- ### ⚖️ Side-by-side multi-model comparison
217
-
218
- Run the same prompt and reference images across multiple models, then compare and save the results on one canvas.
219
-
220
- <br />
221
-
222
- <div align="center">
223
- <img src="docs/assets/readme/multi-model-compare.webp" alt="Comparing the same prompt across multiple image models" width="100%" />
224
- <br />
225
- <sub>Compare results from different models on one canvas, then save the images you prefer in a batch.</sub>
226
- </div>
227
-
228
- <br />
229
-
230
- ### ✨ 500+ prompt inspiration examples
231
-
232
- - Browse and filter **500+ prompt examples**, then favorite, copy, or send them directly to Studio.
233
- - Images are cached locally, so browsing and learning consume no tokens or generation quota.
234
-
235
- <br />
236
-
237
- <div align="center">
238
- <img src="docs/assets/readme/inspiration-library.webp" alt="Prompt inspiration library" width="100%" />
239
- <br />
240
- <sub>Find inspiration first, then send a prompt to Studio. Browsing and copying from the local cache consume no generation quota.</sub>
241
- </div>
242
-
243
- <br />
244
-
245
- ### 🖼️ Gallery, favorites, and batch management
246
-
247
- - Manage images saved from chat and Studio in one place, isolated by workspace.
248
- - Search, filter, favorite, download, continue editing, regenerate, and batch-manage results.
249
-
250
- <br />
251
-
252
- <div align="center">
253
- <img src="docs/assets/readme/gallery-management.webp" alt="Gallery filtering, favorites, and batch management" width="100%" />
254
- <br />
255
- <sub>Filter, favorite, and batch-manage gallery items while keeping data isolated by workspace.</sub>
256
- </div>
257
-
258
- <br />
259
-
260
- ### 🧩 Multiple local ComfyUI workflows
261
-
262
- Bring private image generation on your local GPU directly into Agent conversations.
263
-
264
- - Import and manage multiple named workflows with prompt presets and common placeholders.
265
- - Let the Agent select a workflow by name for text-to-image or image-to-image generation in chat.
266
-
267
- > ComfyUI is not yet integrated into Studio or multi-model comparison.
268
-
269
- <br />
270
-
271
- <div align="center">
272
- <img src="docs/assets/readme/comfyui-workflows.webp" alt="Multiple named ComfyUI workflow settings" width="58%" />
273
- <br />
274
- <sub>Maintain independent workflows for different tasks and let the Agent select them precisely by name.</sub>
275
- </div>
276
-
277
- <br />
278
-
279
- ---
280
-
281
- ## Provider Support
282
-
283
- | Provider | Chat generation | Chat editing | Studio | Multi-model comparison |
284
- | :--- | :---: | :---: | :---: | :---: |
285
- | **Google Gemini** | ✅ | ✅ Multiple | ✅ | ✅ |
286
- | **OpenAI Images** | ✅ | ✅ Multiple | ✅ | ✅ |
287
- | **OpenAI Compatible (relay)** | ✅ | ✅ Multiple | ✅ | ✅ |
288
- | **ByteDance Seedream / Volcengine Ark** | ✅ | ✅ Multiple | ✅ | ✅ |
289
- | **Aliyun DashScope / Qwen Image** | ✅ | ✅ Multiple | ✅ | ✅ |
290
- | **xAI Grok Imagine** | ✅ | ⚠️ Limited | ✅ | ✅ |
291
- | **Zhipu GLM-Image** | ✅ | — | ✅ | ✅ |
292
- | **Local ComfyUI** | ✅ | ✅ Single | — | — |
293
- | **ChatGPT subscription (key-free)** | ✅ | ✅ Multiple | ✅ | ✅ |
294
- | **Grok subscription (key-free)** | ✅ | ✅ Multiple | ✅ | ✅ |
295
- | **Google subscription (key-free)** | ✅ | ✅ Multiple | ✅ | ✅ |
296
-
297
- > Studio and multi-model comparison currently support cloud Providers only (subscription channels included). Multi-model comparison uses the model configured for each Provider in Settings.
298
- > Zhipu GLM-Image does not support image-to-image upstream. xAI image editing goes through the OpenAI-compatible protocol (multipart); some gateways may need further adaptation.
299
- > Subscription channels work through account sign-in (no API key). They support in-chat text-to-image / image-to-image, Studio batch generation, and multi-model comparison; edits ride each channel's edit endpoint (up to 5 reference images), with aspect ratio and quality selectable directly in Studio.
300
-
301
- <details>
302
- <summary><strong>Current default models and endpoints (all configurable)</strong></summary>
303
-
304
- | Provider | Default model | Default Endpoint / Base URL |
305
- | :--- | :--- | :--- |
306
- | Google Gemini | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
307
- | OpenAI Images | `gpt-image-2` | `https://api.openai.com/v1` |
308
- | OpenAI Compatible | Custom | Custom Base URL |
309
- | ByteDance Seedream | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
310
- | Aliyun DashScope | `qwen-image-3.0` | `https://dashscope.aliyuncs.com/api/v1` |
311
- | xAI Grok Imagine | `grok-imagine-image` | `https://api.x.ai/v1` |
312
- | Zhipu GLM-Image | `glm-image` | `https://open.bigmodel.cn/api/paas/v4` |
313
- | Local ComfyUI | Imported API Workflow | `http://127.0.0.1:8188` |
314
- | ChatGPT subscription | `gpt-image-2.5-flare` (channel-fixed) | Account sign-in, no configuration |
315
- | Grok subscription | `grok-imagine-image-2.0` (channel-fixed) | Account sign-in, no configuration |
316
- | Google subscription | `gemini-3.1-flash-image` (channel-fixed) | Account sign-in, no configuration |
317
-
318
- </details>
319
-
320
- <details>
321
- <summary><strong>Aspect ratios and quality tiers per Provider</strong></summary>
322
-
323
- | Provider | Aspect ratios | Quality tiers |
324
- | :--- | :--- | :--- |
325
- | Google Gemini | 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 4:5 · 5:4 · 16:9 · 9:16 · 21:9 | 1K / 2K / 4K |
326
- | OpenAI Images | gpt-image-2 family: 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 | Resolution: 1K / 2K (also 4K for landscape/portrait widescreen); separate quality: auto / low / medium / high |
327
- | OpenAI Compatible | Driven by `openaiCompatSizes` (default 1:1 · 3:2 · 2:3) | Resolution from the size table; separate configurable quality, omitted by default |
328
- | ByteDance Seedream | auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 | 2K / 3K / 4K |
329
- | Aliyun DashScope | 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 | standard |
330
- | xAI Grok Imagine | auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 | 1K / 2K |
331
- | Zhipu GLM-Image | 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 | hd |
332
- | ChatGPT subscription | auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 | auto / low / medium / high / xhigh / max |
333
- | Grok subscription | auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 | 1K / 2K |
334
- | Google subscription | auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 4:5 · 5:4 · 16:9 · 9:16 · 21:9 | standard / HD (4K) |
335
-
336
- > An `auto` ratio lets the model pick the framing from the prompt; tiers the upstream dropped (e.g. Seedream 5.0's 1K) are never exposed.
337
- > Google subscription discovers account projects with valid platform enums and includes the ordinary daily endpoint as a compatibility fallback. When discovery returns no project with `UNSUPPORTED_CLIENT`, it retries using the Antigravity client identity without automatically onboarding the account. If discovery still returns no project, the legacy compatibility project is still tried but is not cached as an actual account project. Generation failures retain redacted discovery, eligibility, and per-endpoint diagnostics instead of only the last 429. The subscription “Test connection” checks stored sign-in status; successful generation verifies image access for that account. A Code Assist `UNSUPPORTED_CLIENT` response alone does not establish that image generation is unavailable.
338
- > Studio exposes separate aspect ratio, resolution, and generation quality controls for OpenAI and compatible providers. Resolution labels show pixel dimensions. Comparison and regeneration preserve these separate parameters.
339
- > Official OpenAI size presets can be customized with `openaiSizes`, shaped as ratio → tier → pixels, e.g. `{ "16:9": { "2K": "2048x1152", "4K": "3840x2160" } }`. For the gpt-image-2 family, dimensions must be multiples of 16, the longest edge at most 3840, aspect ratio within 1:3–3:1, and total pixels within 655360–8294400. Outputs above 3686400 pixels have experimental upstream support. See the [official API reference](https://developers.openai.com/api/reference/resources/images/methods/generate). Older GPT Image models retain their three standard sizes.
340
- > Compatible providers use `openaiCompatSizes` in the same format; an empty table retains the legacy sizes. `openaiCompatQuality` sets the default generation quality (empty means omitted), and `openaiCompatQualityOptions` sets Studio choices. Choosing “Provider default (omit)” omits quality for that request. Conversation tools also accept independent `size` and `quality` parameters.
341
- > “Generation extra fields” maps to `openaiCompatExtraBody`, e.g. `{ "watermark": false }`. These fields apply only to generation, merge after standard fields, and can override matching keys; `false` and nested objects are preserved. Editing continues to use `openaiCompatEditExtra`. For JSON image URL array edits, `openaiCompatEditSizeMode` defaults to `auto`; set it to `selected` to send the selected dimensions. EditExtra can still override size.
342
- > Compatible channels can set a separate editing model with `openaiCompatEditModel`; empty reuses the generation model, and an explicit conversation-tool `model` still overrides one edit. Official SiliconFlow `/v1` endpoints automatically use `siliconflowJson`; relays implementing the same contract can select it manually. Edits post an `image` string to `/images/generations`. `Qwen/Qwen-Image-Edit` supports one reference; `Qwen/Qwen-Image-Edit-2509` supports up to three using `image`, `image2`, and `image3` in order. Generic size and quality fields are omitted; `size`, `image_size`, or `quality` in editing extras produce an actionable error, and the plugin fills reference fields. See the [SiliconFlow API reference](https://docs.siliconflow.cn/docs/api/images-generations-post).
343
- > Ordinary conversation requests should omit provider and model to use the saved default. The model receives live default-provider and parameter instructions. Omit unused optional fields; blank dimensions are treated as absent, while two nonempty `size` / `aspect_ratio` values still conflict. ChatGPT subscription does not accept `image_size`; use `size` or `aspect_ratio` rather than a tier such as `1K`.
344
- > The workbench shows “Visible watermark: Channel default / Off / On” beside ratio and resolution, checking generation and editing separately. Seedream, native DashScope Qwen Image, and recognized official SenseNova and Qwen compatible endpoints enable it automatically; recognized compatible endpoints also select their JSON edit contracts automatically. SenseNova matches `https://token.sensenova.cn/v1` and `sensenova-u1.5-lite`; Qwen matches official workspace hosts under `/compatible-mode/v1` with Qwen Image 3.0/3.0 Pro or 2.1 Pro/Turbo. Other compatible channels can bind a boolean `watermark`, `watermark_enabled`, or `parameters.watermark` through the matching operation's extra fields; editing requires a JSON format. Unknown channels and Zhipu display a disabled “Support unconfirmed” control; interfaces without a confirmed switch also show an explanation. A model name alone does not identify an unknown relay. Channel default preserves configured fields or omits the parameter; an explicit choice overrides only the watermark field and is retained for batches, comparison models supporting the operation, and regeneration.
345
-
346
- </details>
347
-
348
- ---
349
-
350
- ## Data and Privacy
351
-
352
- - **BYOK:** API keys are stored through the DSH Credentials service and are never displayed in plaintext on the settings page.
353
- - **Subscription sign-in:** Subscription tokens are saved in DSH Credentials after your authorized sign-in, fully isolated from API keys; the browser side never touches a token.
354
- - **Cloud requests:** The prompt and reference images used for a request are sent to the selected Provider. Follow that Provider's terms of service.
355
- - **Local ComfyUI:** Requests are sent to the configured ComfyUI address.
356
- - **Workspace files:** When workspace saving is enabled, chat results are written to disk; Studio saves only the candidates you select.
357
- - **Gallery and favorites:** Gallery metadata and favorite state are stored in the current browser's local storage.
358
- - **Inspiration cache:** Example metadata ships with the plugin. Images load on demand and are cached locally, and the cache can be cleared at any time.
359
-
360
- ## FAQ
361
-
362
- <details>
363
- <summary><strong>What should I do if “Image Generation” is missing after installation?</strong></summary>
364
-
365
- The settings entry depends on the DSH version: 0.1.6 and newer place it on the plugin's detail page (click **Plugins** in the left sidebar, then dsh-image-gen under **Installed**), while 0.1.5 and earlier place it at **Settings → Plugins → Plugin Configuration → Image Generation**.
366
-
367
- If it is missing in both places, fully restart the current DSH Profile, then inspect the plugin configuration:
368
-
369
- ```bash
370
- dsh --profile web --dump-config
371
- ```
372
-
373
- If `dsh-image-gen` is absent from the output, run the installation command again. When filing an issue, include the DSH version, plugin version, and relevant error logs, but never include your API key.
374
-
375
- </details>
376
-
377
- <details>
378
- <summary><strong>Where are generated images saved?</strong></summary>
379
-
380
- When “Save to workspace” is enabled, chat results are saved to the `dsh-image-gen/` subdirectory of the current workspace by default. You can change this directory in Settings. Studio candidates remain on the temporary canvas until you select which results should enter the gallery and be saved.
381
-
382
- </details>
383
-
384
- <details>
385
- <summary><strong>How do I use a Gemini relay that only supports generateContent?</strong></summary>
386
-
387
- In Google Gemini settings, select “Native generateContent” under “Request protocol”, enter the relay's API base URL (for example, `https://your-relay.example/v1beta`), and save. This applies to conversation generation, editing, and Studio. An existing full Interactions URL can also be kept; the plugin builds the native endpoint using the selected model.
388
-
389
- The configuration field is `googleNative: true`. It defaults to `false`, keeping existing users on the Interactions protocol.
390
-
391
- </details>
392
-
393
- <details>
394
- <summary><strong>Why is ComfyUI not available in Studio?</strong></summary>
395
-
396
- Studio and multi-model comparison currently support cloud Providers only; ComfyUI is not yet integrated. ComfyUI supports text-to-image, single-image editing, and multiple named workflows through Agent chat.
397
-
398
- </details>
399
-
400
- <details>
401
- <summary><strong>Does deleting an item from the gallery remove its chat message?</strong></summary>
402
-
403
- No. Deleting a gallery record does not modify the original chat message. You may separately choose to remove the corresponding local image file from the workspace. File deletion is normally irreversible, so confirm carefully.
404
-
405
- </details>
406
-
407
- <details>
408
- <summary><strong>How do I upgrade?</strong></summary>
409
-
410
- ```bash
411
- pnpm dsh plugin --profile web add dsh-image-gen@latest
412
- ```
413
-
414
- Restart the corresponding DSH Profile after upgrading.
415
-
416
- </details>
417
-
418
- ---
419
-
420
- ## Local Development
421
-
422
- ```bash
423
- git clone https://github.com/shanliuling/dsh-image-gen.git
424
- cd dsh-image-gen
425
-
426
- pnpm install
427
- pnpm run typecheck
428
- pnpm test
429
- pnpm run build
430
- pnpm run pack:check
431
- pnpm run test:package
432
- ```
433
-
434
- Saving settings on modern DSH requires the actually loaded `@deepseek-ai/schemastery >=3.18.4 <4`. The card distinguishes loading, missing host forms, remote connections that cannot persist, and incompatible schemas. Legacy DSH settings interfaces are retained. Check the dependencies resolved in the plugin profile when updating, as well as those in the source checkout.
435
-
436
- `test:package` requires network access. It installs the current build's tarball and pinned published DSH 0.2 settings services in a temporary directory, then uses real React rendering to verify card state, the bundled save handler, profile file persistence, a fresh form, host restart, and actionable refusal with old schemastery. Image APIs, browser DOM, and RPC transport are outside this test. CI runs it on Windows and Linux.
437
-
438
- Feedback is welcome through [Issues](https://github.com/shanliuling/dsh-image-gen/issues). Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a Pull Request.
439
-
440
- ## Acknowledgements
441
-
442
- - [AtomGit](https://atomgit.com/shanliuling/dsh-image-gen): Hosts a copy of the project for users in China to browse and download the source code.
443
-
444
- ## License
445
-
446
- This project is open source under the [Apache License 2.0](LICENSE).
447
-
448
- <div align="center">
449
-
450
- If `dsh-image-gen` improves your workflow, consider giving the project a ⭐ **Star** to support continued maintenance.
451
-
452
- **[View Releases](https://github.com/shanliuling/dsh-image-gen/releases) · [Open an Issue](https://github.com/shanliuling/dsh-image-gen/issues) · [Contribute](CONTRIBUTING.md)**
453
-
454
- </div>
1
+ <div align="center">
2
+
3
+ <img src="docs/assets/readme/hero-en.webp" alt="dsh-image-gen feature overview" width="100%" />
4
+
5
+ <br />
6
+
7
+ <p><a href="README.md">简体中文</a> · <strong>English</strong></p>
8
+
9
+ # 🎨 dsh-image-gen
10
+
11
+ ### Draw by talking, right inside DeepSeek Harness
12
+
13
+ <p><b>Batch generation from one message · A canvas the AI can actually read · Agent-picked prompts from 500+ examples · Subscription sign-in, no API key</b></p>
14
+
15
+ <p>
16
+ <a href="https://www.npmjs.com/package/dsh-image-gen"><img src="https://img.shields.io/npm/v/dsh-image-gen?style=flat-square&color=4f6ef7" alt="npm version" /></a>
17
+ <a href="https://www.npmjs.com/package/dsh-image-gen"><img src="https://img.shields.io/npm/dm/dsh-image-gen?style=flat-square&color=10b981" alt="npm downloads" /></a>
18
+ <a href="https://github.com/shanliuling/dsh-image-gen/actions/workflows/ci.yml"><img src="https://github.com/shanliuling/dsh-image-gen/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
19
+ <a href="https://dsh-insights.com/p/shanliuling/dsh-image-gen"><img src="https://dsh-insights.com/badge/shanliuling/dsh-image-gen.svg" alt="DSH Insights health" /></a>
20
+ <a href="https://github.com/shanliuling/dsh-image-gen/stargazers"><img src="https://img.shields.io/github/stars/shanliuling/dsh-image-gen?style=flat-square" alt="GitHub stars" /></a>
21
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-f5c542?style=flat-square" alt="License: Apache-2.0" /></a>
22
+ <a href="https://linux.do/"><img src="https://img.shields.io/badge/LINUX%20DO-Community-555?style=flat-square" alt="LINUX DO" /></a>
23
+ </p>
24
+
25
+ <p>
26
+ <a href="https://atomgit.com/shanliuling/dsh-image-gen"><img src="https://atomgit.com/shanliuling/dsh-image-gen/star/new_badge.svg" alt="AtomGit" height="55" /></a>
27
+ </p>
28
+
29
+ <p>
30
+ <a href="#just-say-it">Just say it</a> ·
31
+ <a href="#quick-start">Quick Start</a> ·
32
+ <a href="#core-capabilities">Core Capabilities</a> ·
33
+ <a href="#provider-support">Provider Support</a> ·
34
+ <a href="#faq">FAQ</a>
35
+ </p>
36
+
37
+ <br />
38
+
39
+ <table>
40
+ <tr>
41
+ <td width="50%" align="center"><b>🔁 One message, a whole set</b><br /><sub>5 scenes in one message, generated one by one</sub></td>
42
+ <td width="50%" align="center"><b>✏️ Sketch it, circle it, done</b><br /><sub>Circle the sword → an axe · stick figure → finished art</sub></td>
43
+ </tr>
44
+ <tr>
45
+ <td><a href="#chat-batch"><img src="docs/assets/readme/hero-batch.webp" alt="One message with 5 scenes; the Agent generates each and collects them in the Gallery" width="100%" /></a></td>
46
+ <td><a href="#ai-canvas"><img src="docs/assets/readme/hero-canvas.webp" alt="Circling a sword on the canvas to turn it into an axe, then turning a stick figure into an anime swordswoman" width="100%" /></a></td>
47
+ </tr>
48
+ </table>
49
+
50
+ </div>
51
+
52
+ <br />
53
+
54
+ `dsh-image-gen` is a native image creation plugin for DeepSeek Harness. Instead of bolting an image button onto the chat, it **teaches the Agent itself to make images**: it can plan and generate a whole set in one go, read your sketches and selections on the canvas, and pull the right style template from the inspiration library on its own. When you want fine-grained control, Studio, multi-model comparison, and the Gallery are one click away.
55
+
56
+ > **Already paying for ChatGPT, Grok, or Google? Just sign in and start generating—no separate API key purchase needed.**
57
+
58
+ Supports: Gemini · OpenAI / Compatible · Seedream · DashScope · Grok Imagine · GLM-Image · Local ComfyUI
59
+
60
+ ```bash
61
+ pnpm dsh plugin --profile web add dsh-image-gen@latest
62
+ ```
63
+
64
+ > See [Releases](https://github.com/shanliuling/dsh-image-gen/releases) for what changed in each version.
65
+
66
+ ---
67
+
68
+ ## Just say it
69
+
70
+ No parameters to learn, no pages to switch. Just say it in a DSH chat:
71
+
72
+ | You say | What the plugin does |
73
+ | :-- | :-- |
74
+ | "Make 4 illustrations for my *Coffee Shop Grand Opening* post, consistent flat style, 16:9" | 🔁 **Batch generation in chat**: the Agent splits the request into 4 prompts and generates them one by one, all delivered in a single reply |
75
+ | "Draw a coffee shop menu in hand-drawn style #123" | ✨ **Inspiration on autopilot**: the Agent searches the 500+ example library for that style, then applies the template |
76
+ | "Turn the sketch I drew on the canvas into a finished illustration" | ✏️ **Reads the canvas**: the Agent looks at your canvas selection and turns the draft into an image |
77
+ | "Turn the sword I circled into an axe, keep everything else" | 🎯 **Edit what you circle**: only the marked area changes |
78
+ | "Keep this character exactly the same, but put them in a snowy scene" | 🎭 **Identity consistency**: edits keep the same person or object instead of a lookalike |
79
+ | "Same prompt, one from GPT and one from Gemini, side by side" | ⚖️ **Multi-model comparison**: runs several models concurrently and lays the results out on one canvas |
80
+
81
+ <img src="docs/assets/readme/workflow-overview-en.webp" alt="dsh-image-gen complete AI image creation workflow" width="100%" />
82
+
83
+ ---
84
+
85
+ ## Quick Start
86
+
87
+ ### 1. Install the plugin
88
+
89
+ Requirements: DeepSeek Harness stable version, Node.js `^22.19.0` or `>= 24.0.0`.
90
+
91
+ Run this command from your DeepSeek Harness project root:
92
+
93
+ ```bash
94
+ pnpm dsh plugin --profile web add dsh-image-gen@latest
95
+ ```
96
+
97
+ > 💬 **Power-user tip:** You can also send this directly to the Agent in a DSH chat:<br />
98
+ > `Install the image generation plugin by running this command in the terminal: pnpm dsh plugin --profile web add dsh-image-gen@latest`
99
+
100
+ <details>
101
+ <summary><strong>Alternative installation methods (global / GitHub / local development)</strong></summary>
102
+
103
+ ```bash
104
+ # If dsh is installed globally:
105
+ dsh plugin --profile web add dsh-image-gen@latest
106
+
107
+ # Install the latest source directly from GitHub:
108
+ pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
109
+
110
+ # Clone the repository and install it for local development:
111
+ git clone https://github.com/shanliuling/dsh-image-gen.git
112
+ pnpm dsh plugin --profile web add ./dsh-image-gen
113
+ ```
114
+
115
+ </details>
116
+
117
+ ### 2. Configure a Provider
118
+
119
+ After restarting DSH, click the **Plugins** icon in the left sidebar, then click **dsh-image-gen** under **Installed** — the Image Generation settings form lives on the plugin's detail page:
120
+
121
+ **Plugins panel → Installed → dsh-image-gen**
122
+
123
+ > DSH 0.1.5 and earlier have no Plugins panel; the entry there is **Settings → Plugins → Plugin Configuration → Image Generation**. The same plugin build supports both.
124
+
125
+ Choose a Provider, enter your API key, and adjust the model, Endpoint / Base URL, and workspace-save options as needed. Once the key is stored, click **Test connection** to verify it, or **Fetch models** to pull every image-capable model the provider offers—no manual lookups needed. For ComfyUI, enter an address reachable by the DSH Host and import an **API Format Workflow JSON** file.
126
+
127
+ Already paying for ChatGPT, Grok, or Google? No API key needed: expand the matching subscription Provider row, click **Sign in** and complete the authorization in your browser, then start generating (and editing) right away.
128
+
129
+ <div align="center">
130
+ <img src="docs/assets/readme/config.webp" alt="Choosing the default Provider on the plugin detail page, checking channel status, and switching channels from the chat input" width="100%" />
131
+ <br />
132
+ <sub>Pick a default Provider → check each channel's key / sign-in status → switch channels right from the chat input.</sub>
133
+ </div>
134
+
135
+ ### 3. Start creating
136
+
137
+ Describe the image you want directly in chat:
138
+
139
+ ```text
140
+ Create a cinematic cyberpunk cat on a neon street at night, 16:9.
141
+ ```
142
+
143
+ Want a whole set? Just say how many and what should stay consistent:
144
+
145
+ ```text
146
+ Make 5 images for my "Weekend Camping Checklist" post: tent, stove, sleeping bag, lights, snacks. Consistent Japanese hand-drawn style, 3:4.
147
+ ```
148
+
149
+ You can also upload a reference image directly for style transfer or editing:
150
+
151
+ ```text
152
+ Keep the character and composition unchanged, then add black sunglasses to the cat.
153
+ ```
154
+
155
+ <br />
156
+
157
+ <div align="center">
158
+ <img src="docs/assets/readme/chat-example.webp" alt="Chat generation and editing example" width="60%" />
159
+ <br />
160
+ <sub>In-chat generation, editing, and continuous refinement.</sub>
161
+ </div>
162
+
163
+ <br />
164
+
165
+ For more precise parameter control, open **Gallery** from the conversation header, then switch between **Gallery / Studio / Inspiration / Favorites**.
166
+
167
+ ---
168
+
169
+ ## Core Capabilities
170
+
171
+ <a id="chat-batch"></a>
172
+
173
+ ### 🔁 Batch generation in chat: one message, a whole set
174
+
175
+ Post illustrations, storyboards, series art, or several variations on a theme—without asking for them one at a time.
176
+
177
+ - Describe how many images you want and what they share. The Agent plans the set of prompts itself, **up to 10 images per call**, attached in order to a single reply.
178
+ - Aspect ratio, resolution, model, and Provider can be set once for the whole set to keep it consistent.
179
+ - Images generate one after another, and **one failure never stops the rest**: the reply reports "X of Y generated" and lists what failed and why.
180
+ - Works with local ComfyUI and subscription channels too.
181
+
182
+ <div align="center">
183
+ <img src="docs/assets/readme/chat-batch.webp" alt="One message asks the Agent for 5 anime illustrations; a failed one is retried and the set lands in the Gallery" width="100%" />
184
+ <br />
185
+ <sub>One message with 5 scenes → the Agent plans two batches → images arrive one by one, the failed one is retried on its own → the whole set lands in the Gallery. (Waiting sped up.)</sub>
186
+ </div>
187
+
188
+ > **How is this different from Studio batches?** Chat batches are a **set of different images** the Agent plans for you (say, 4 illustrations of different scenes). Studio batches are **several candidates for the same prompt**, and you keep the ones you like.
189
+
190
+ <br />
191
+
192
+ <a id="ai-canvas"></a>
193
+
194
+ ### ✏️ A canvas the AI can actually read
195
+
196
+ Sketch on an infinite canvas, lay out references, circle what should change, then just tell the AI what you want. **The Agent sees what is on the canvas and what you have selected**, so there is no need to screenshot, upload, or describe positions.
197
+
198
+ - **Sketch → image**: draw a rough outline, select it, and say "make this a cartoon character".
199
+ - **Edit what you circle**: mark an area on an existing image and say "turn this into an axe"; only the circled part changes.
200
+ - **Combine references**: drag images from Recent generations or the Gallery onto the canvas, or click Send to canvas on a thumbnail, then select several together as references. Repeated imports of the same history item are deduplicated.
201
+ - Every result stays on the canvas, so you can keep iterating from any version.
202
+
203
+ <div align="center">
204
+ <img src="docs/assets/readme/canvas-edit.webp" alt="Circle the sword on the canvas, say one sentence, and the Agent swaps only the sword for an axe" width="100%" />
205
+ <br />
206
+ <sub><b>Edit what you circle</b>: circle the swordswoman's blade, ask for an axe, and the Agent confirms what you marked, then changes only that.</sub>
207
+ <br /><br />
208
+ <img src="docs/assets/readme/canvas-sketch.webp" alt="Draw a stick-figure sketch on the canvas and the Agent turns it into an anime swordswoman with the same pose" width="100%" />
209
+ <br />
210
+ <sub><b>Sketch → image</b>: doodle a stick figure holding a sword, select it, ask for "the previous style", and the pose and framing follow your sketch. (Waiting sped up.)</sub>
211
+ </div>
212
+
213
+ <br />
214
+
215
+ ### 💬 In-chat generation, editing, and revision switching
216
+
217
+ - Use natural language for text-to-image, image-to-image, multi-image reference, and style transfer.
218
+ - **Identity consistency**: when you ask to keep a person, character, or object the same, the plugin tells the model to reuse the subject from the references and change only the scene, clothing, pose, or style, rather than drawing a similar-looking replacement.
219
+ - Edit the original prompt to regenerate, then switch between revisions on the same image card.
220
+
221
+ <br />
222
+
223
+ <div align="center">
224
+ <img src="docs/assets/readme/regenerating.webp" alt="Image regeneration in progress" width="46%" />
225
+ <img src="docs/assets/readme/revision-switcher.webp" alt="Switching between generated revisions on the same image card" width="46%" />
226
+ <br />
227
+ <sub>Regenerate in place after editing the prompt, then switch between previous results on the same image card.</sub>
228
+ </div>
229
+
230
+ <br />
231
+
232
+ ### ✨ 500+ prompt inspirations, and the Agent finds them for you
233
+
234
+ Ships with a hand-drawn style cookbook (styles / layouts / theme colors) and the awesome-gpt-image-2 example set: 500+ ready-to-reuse prompts.
235
+
236
+ - **Name it in chat**: say "use style #123", "make it an infographic layout", or "Morandi palette", and the Agent searches the library first, then applies the template to your topic. Styles, layouts, and theme colors can be combined.
237
+ - **Browse in the UI**: filter, favorite, copy, or send a prompt straight to Studio (see the Studio demo below).
238
+ - Images are cached locally, so browsing and learning consume no tokens or generation quota.
239
+
240
+ <br />
241
+
242
+ <div align="center">
243
+ <img src="docs/assets/readme/inspiration-library.webp" alt="Prompt inspiration library" width="100%" />
244
+ <br />
245
+ <sub>Find inspiration first, then send a prompt to Studio. Browsing and copying from the local cache consume no generation quota.</sub>
246
+ </div>
247
+
248
+ <br />
249
+
250
+ ### 🎛️ Studio: hands-on control, no chat needed
251
+
252
+ When you want precise control, open **Gallery → Studio** from the conversation header and every parameter is right there.
253
+
254
+ - **Start from inspiration**: click "Send to Studio" in the inspiration library and the prompt is filled in.
255
+ - **Every parameter in view**: pick the Provider, model, aspect ratio, quality, and watermark separately; generate 1–4 candidates and save only the ones you like.
256
+ - **Keep editing past results**: drag an image in from Recent generations and click "Continue editing" to make it the image-to-image reference (up to 5).
257
+ - Switch between single model and multi-model comparison in one click.
258
+
259
+ <br />
260
+
261
+ <div align="center">
262
+ <img src="docs/assets/readme/studio.webp" alt="Picking a prompt from the inspiration library, sending it to Studio, and generating a poster" width="100%" />
263
+ <br />
264
+ <sub>Pick a prompt from the library → send it to Studio → set parameters and generate → decide what to keep. (Waiting sped up.)</sub>
265
+ <br /><br />
266
+ <img src="docs/assets/readme/studio-ref.webp" alt="Dragging an image in from Recent generations and clicking Continue editing to use it as a reference" width="100%" />
267
+ <br />
268
+ <sub>Drag an image in from Recent generations → "Continue editing" → Studio switches to image-to-image with it as the reference.</sub>
269
+ </div>
270
+
271
+ <br />
272
+
273
+ ### ⚖️ Side-by-side multi-model comparison
274
+
275
+ Run the same prompt and reference images across multiple models concurrently, then compare and save the results on one canvas.
276
+
277
+ <br />
278
+
279
+ <div align="center">
280
+ <img src="docs/assets/readme/multi-model-compare.webp" alt="Comparing the same prompt across multiple image models" width="100%" />
281
+ <br />
282
+ <sub>Compare results from different models on one canvas, then save the images you prefer in a batch.</sub>
283
+ </div>
284
+
285
+ <br />
286
+
287
+ ### 🖼️ Gallery, favorites, and batch management
288
+
289
+ - Manage images saved from chat and Studio in one place, isolated by workspace.
290
+ - Search, filter, favorite, download, continue editing, regenerate, and batch-manage results.
291
+
292
+ <br />
293
+
294
+ <div align="center">
295
+ <img src="docs/assets/readme/gallery-management.webp" alt="Gallery filtering, favorites, and batch management" width="100%" />
296
+ <br />
297
+ <sub>Filter, favorite, and batch-manage gallery items while keeping data isolated by workspace.</sub>
298
+ </div>
299
+
300
+ <br />
301
+
302
+ ### 🧩 Multiple local ComfyUI workflows
303
+
304
+ Bring private image generation on your local GPU directly into Agent conversations.
305
+
306
+ - Import and manage multiple named workflows with prompt presets and common placeholders.
307
+ - Let the Agent select a workflow by name for text-to-image, image-to-image, or batch generation in chat.
308
+
309
+ > ComfyUI is not yet integrated into Studio or multi-model comparison.
310
+
311
+ <br />
312
+
313
+ <div align="center">
314
+ <img src="docs/assets/readme/comfyui-workflows.webp" alt="Multiple named ComfyUI workflow settings" width="58%" />
315
+ <br />
316
+ <sub>Maintain independent workflows for different tasks and let the Agent select them precisely by name.</sub>
317
+ </div>
318
+
319
+ <br />
320
+
321
+ ---
322
+
323
+ ## Provider Support
324
+
325
+ | Provider | Chat generation | Chat batch | Chat editing | Studio | Multi-model comparison |
326
+ | :--- | :---: | :---: | :---: | :---: | :---: |
327
+ | **Google Gemini** | ✅ | ✅ | ✅ Multiple | ✅ | ✅ |
328
+ | **OpenAI Images** | ✅ | ✅ | ✅ Multiple | ✅ | ✅ |
329
+ | **OpenAI Compatible (relay)** | ✅ | ✅ | ✅ Multiple | ✅ | ✅ |
330
+ | **ByteDance Seedream / Volcengine Ark** | ✅ | ✅ | ✅ Multiple | ✅ | ✅ |
331
+ | **Aliyun DashScope / Qwen Image** | ✅ | ✅ | ✅ Multiple | ✅ | ✅ |
332
+ | **xAI Grok Imagine** | ✅ | ✅ | ⚠️ Limited | ✅ | ✅ |
333
+ | **Zhipu GLM-Image** | ✅ | ✅ | — | ✅ | ✅ |
334
+ | **Local ComfyUI** | ✅ | ✅ | ✅ Single | — | — |
335
+ | **ChatGPT subscription (key-free)** | ✅ | ✅ | ✅ Multiple | ✅ | ✅ |
336
+ | **Grok subscription (key-free)** | ✅ | ✅ | ✅ Multiple | ✅ | ✅ |
337
+ | **Google subscription (key-free)** | ✅ | ✅ | ✅ Multiple | ✅ | ✅ |
338
+
339
+ > Studio and multi-model comparison currently support cloud Providers only (subscription channels included). Multi-model comparison uses the model configured for each Provider in Settings.
340
+ > Zhipu GLM-Image does not support image-to-image upstream. xAI image editing goes through the OpenAI-compatible protocol (multipart); some gateways may need further adaptation.
341
+ > Subscription channels work through account sign-in (no API key). Edits ride each channel's edit endpoint (up to 5 reference images), with aspect ratio and quality selectable directly in Studio.
342
+
343
+ 📖 **For default models and endpoints, per-Provider aspect ratios and quality tiers, size tables, watermarks, relay edit formats, and other advanced settings, see the [Provider configuration reference](docs/providers.en.md).**
344
+
345
+ ---
346
+
347
+ ## Data and Privacy
348
+
349
+ - **BYOK:** API keys are stored through the DSH Credentials service and are never displayed in plaintext on the settings page.
350
+ - **Subscription sign-in:** Subscription tokens are saved in DSH Credentials after your authorized sign-in, fully isolated from API keys; the browser side never touches a token.
351
+ - **Cloud requests:** The prompt and reference images used for a request are sent to the selected Provider. Follow that Provider's terms of service.
352
+ - **Provider image downloads:** Downloads use the host's existing network and proxy configuration without additional Fake-IP, private-address or loopback blocking. Complete SSRF target restrictions are not currently provided.
353
+ - **Local ComfyUI:** Requests are sent to the configured ComfyUI address.
354
+ - **Workspace files:** When workspace saving is enabled, chat results are written to disk; Studio saves only the candidates you select.
355
+ - **Gallery and favorites:** Gallery metadata and favorite state are stored in the current browser's local storage.
356
+ - **Deleted records:** Normal deletion retains a small image ID marker, including after 30 days, so reopening an old conversation does not silently restore the image to the gallery.
357
+ - **Inspiration cache:** Example metadata ships with the plugin. Images load on demand and are cached locally, and the cache can be cleared at any time.
358
+
359
+ ## FAQ
360
+
361
+ <details>
362
+ <summary><strong>What should I do if “Image Generation” is missing after installation?</strong></summary>
363
+
364
+ The settings entry depends on the DSH version: 0.1.6 and newer place it on the plugin's detail page (click **Plugins** in the left sidebar, then dsh-image-gen under **Installed**), while 0.1.5 and earlier place it at **Settings → Plugins → Plugin Configuration → Image Generation**.
365
+
366
+ If it is missing in both places, fully restart the current DSH Profile, then inspect the plugin configuration:
367
+
368
+ ```bash
369
+ dsh --profile web --dump-config
370
+ ```
371
+
372
+ If `dsh-image-gen` is absent from the output, run the installation command again. When filing an issue, include the DSH version, plugin version, and relevant error logs, but never include your API key.
373
+
374
+ </details>
375
+
376
+ <details>
377
+ <summary><strong>How many images can one batch generate?</strong></summary>
378
+
379
+ Up to 10 per batch call; beyond that, the plugin tells the Agent to split the request into several calls. Images generate one at a time, a single failure does not stop the others, and any failures are listed with their reasons.
380
+
381
+ </details>
382
+
383
+ <details>
384
+ <summary><strong>Where are generated images saved?</strong></summary>
385
+
386
+ When “Save to workspace” is enabled, chat results are saved to the `dsh-image-gen/` subdirectory of the current workspace by default. You can change this directory in Settings. Studio candidates remain on the temporary canvas until you select which results should enter the gallery and be saved.
387
+
388
+ </details>
389
+
390
+ <details>
391
+ <summary><strong>How do I use a Gemini relay that only supports generateContent?</strong></summary>
392
+
393
+ In Google Gemini settings, select “Native generateContent” under “Request protocol”, enter the relay's API base URL (for example, `https://your-relay.example/v1beta`), and save. This applies to conversation generation, editing, and Studio. An existing full Interactions URL can also be kept; the plugin builds the native endpoint using the selected model.
394
+
395
+ The configuration field is `googleNative: true`. It defaults to `false`, keeping existing users on the Interactions protocol.
396
+
397
+ </details>
398
+
399
+ <details>
400
+ <summary><strong>Why is ComfyUI not available in Studio?</strong></summary>
401
+
402
+ Studio and multi-model comparison currently support cloud Providers only; ComfyUI is not yet integrated. ComfyUI supports text-to-image, single-image editing, batch generation, and multiple named workflows through Agent chat.
403
+
404
+ </details>
405
+
406
+ <details>
407
+ <summary><strong>Does deleting an item from the gallery remove its chat message?</strong></summary>
408
+
409
+ No. Deleting a gallery record does not modify the original chat message. You may separately choose to remove the corresponding local image file from the workspace. File deletion is normally irreversible, so confirm carefully.
410
+
411
+ </details>
412
+
413
+ <details>
414
+ <summary><strong>How do I upgrade?</strong></summary>
415
+
416
+ ```bash
417
+ pnpm dsh plugin --profile web add dsh-image-gen@latest
418
+ ```
419
+
420
+ Restart the corresponding DSH Profile after upgrading.
421
+
422
+ </details>
423
+
424
+ ---
425
+
426
+ ## Local Development
427
+
428
+ ```bash
429
+ git clone https://github.com/shanliuling/dsh-image-gen.git
430
+ cd dsh-image-gen
431
+
432
+ pnpm install
433
+ pnpm run typecheck
434
+ pnpm test
435
+ pnpm run build
436
+ pnpm run pack:check
437
+ pnpm run test:package
438
+ ```
439
+
440
+ Maintainer notes on dependency requirements and the scope of `test:package` are in [CONTRIBUTING.md](CONTRIBUTING.md). Feedback is welcome through [Issues](https://github.com/shanliuling/dsh-image-gen/issues); read the contributing guide before opening a Pull Request.
441
+
442
+ ## Acknowledgements
443
+
444
+ - [AtomGit](https://atomgit.com/shanliuling/dsh-image-gen): Hosts a copy of the project for users in China to browse and download the source code.
445
+
446
+ ## License
447
+
448
+ This project is open source under the [Apache License 2.0](LICENSE).
449
+
450
+ <div align="center">
451
+
452
+ If `dsh-image-gen` improves your workflow, consider giving the project a ⭐ **Star** to support continued maintenance.
453
+
454
+ **[View Releases](https://github.com/shanliuling/dsh-image-gen/releases) · [Open an Issue](https://github.com/shanliuling/dsh-image-gen/issues) · [Contribute](CONTRIBUTING.md)**
455
+
456
+ </div>