dsh-image-gen 0.8.0 → 0.8.6

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.
package/README.en.md CHANGED
@@ -1,397 +1,423 @@
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="#quick-start">Quick Start</a> ·
27
- <a href="#core-capabilities">Core Capabilities</a> ·
28
- <a href="#provider-support">Provider Support</a> ·
29
- <a href="#faq">FAQ</a>
30
- </p>
31
-
32
- <br />
33
-
34
- <img src="docs/assets/readme/canvas-generate.webp" alt="Sketching on the infinite canvas and generating a final image through conversation" width="46%" />
35
- <img src="docs/assets/readme/canvas-edit.webp" alt="Continuing to edit and iterate through conversation based on existing results" width="46%" />
36
- <br />
37
- <sub>Left: Sketch and place reference images on the canvas, then generate through conversation. · Right: Keep iterating on existing results through conversation.</sub>
38
-
39
- <br />
40
-
41
- <img src="docs/assets/readme/chat-generate.webp" alt="Generating images directly in conversation" width="46%" />
42
- <img src="docs/assets/readme/other-features.webp" alt="Studio batch creation, inspiration library, gallery and more" width="46%" />
43
- <br />
44
- <sub>Left: Describe and generate images right in the conversation. · Right: Studio batch creation, inspiration library, gallery, and more.</sub>
45
-
46
- </div>
47
-
48
- **A complete AI image creation workflow for DeepSeek Harness.**
49
-
50
- `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.
51
-
52
- 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.
53
-
54
- > **Already paying for ChatGPT, Grok, or Google? Just sign in and start generating—no separate API key purchase needed.**
55
-
56
- Supports: Gemini · OpenAI / Compatible · Seedream · DashScope · Grok Imagine · GLM-Image · Local ComfyUI
57
-
58
- ```bash
59
- pnpm dsh plugin --profile web add dsh-image-gen@latest
60
- ```
61
-
62
- > **Update notice:** This release includes major changes. Existing users should update to the latest version.
63
-
64
- <img src="docs/assets/readme/workflow-overview-en.webp" alt="dsh-image-gen complete AI image creation workflow" width="100%" />
65
-
66
- ---
67
-
68
- ## One plugin, the complete AI image creation workflow
69
-
70
- | Entry | Best for | What you can do |
71
- | :--- | :--- | :--- |
72
- | 💬 **Chat** | Expressing ideas quickly | Text-to-image, image-to-image, continuous editing, and revision iteration |
73
- | ✏️ **Canvas** | Expressing visual creativity | Sketch-to-image, reference composition, spatial creation, and continuous refinement |
74
- | 🎛️ **Studio** | Fine-grained control over creation parameters | Batch generation, multi-image reference, and advanced parameter tuning |
75
- | ✨ **Inspiration** | Finding creative direction | Prompt examples, style exploration, and one-click reuse |
76
- | 🖼️ **Gallery** | Managing generated results | Search, favorite, download, and reuse |
77
-
78
- ---
79
-
80
- ## Quick Start
81
-
82
- ### 1. Install the plugin
83
-
84
- Requirements: DeepSeek Harness stable version, Node.js `^22.19.0` or `>= 24.0.0`.
85
-
86
- Run this command from your DeepSeek Harness project root:
87
-
88
- ```bash
89
- pnpm dsh plugin --profile web add dsh-image-gen@latest
90
- ```
91
-
92
- > 💬 **Power-user tip:** You can also send this directly to the Agent in a DSH chat:<br />
93
- > `Install the image generation plugin by running this command in the terminal: pnpm dsh plugin --profile web add dsh-image-gen@latest`
94
-
95
- <details>
96
- <summary><strong>Alternative installation methods (global / GitHub / local development)</strong></summary>
97
-
98
- ```bash
99
- # If dsh is installed globally:
100
- dsh plugin --profile web add dsh-image-gen@latest
101
-
102
- # Install the latest source directly from GitHub:
103
- pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
104
-
105
- # Clone the repository and install it for local development:
106
- git clone https://github.com/shanliuling/dsh-image-gen.git
107
- pnpm dsh plugin --profile web add ./dsh-image-gen
108
- ```
109
-
110
- </details>
111
-
112
- ### 2. Configure a Provider
113
-
114
- After restarting DSH, open:
115
-
116
- **Settings → Plugins → Image Generation**
117
-
118
- > On DSH 0.1.5 and earlier the entry is **Settings → Plugins → Plugin Configuration → Image Generation**; the same plugin build supports both.
119
-
120
- 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.
121
-
122
- 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.
123
-
124
- ### 3. Start creating
125
-
126
- Describe the image you want directly in chat:
127
-
128
- ```text
129
- Create a cinematic cyberpunk cat on a neon street at night, 16:9.
130
- ```
131
-
132
- You can also upload a reference image directly for style transfer or editing:
133
-
134
- ```text
135
- Keep the character and composition unchanged, then add black sunglasses to the cat.
136
- ```
137
-
138
- <br />
139
-
140
- <div align="center">
141
- <img src="docs/assets/readme/provider-settings.webp" alt="DSH Plugin Settings" width="46%" />
142
- <img src="docs/assets/readme/chat-example.webp" alt="Chat generation and editing example" width="46%" />
143
- <br />
144
- <sub>Left: Provider Settings · Right: In-chat generation, editing, and continuous refinement.</sub>
145
- </div>
146
-
147
- <br />
148
-
149
- For more precise parameter control, open **Gallery** from the conversation header, then switch between **Gallery / Studio / Inspiration / Favorites**.
150
-
151
- ---
152
-
153
- ## Core Capabilities
154
-
155
- ### 💬 In-chat generation, editing, and revision switching
156
-
157
- - Use natural language for text-to-image, image-to-image, multi-image reference, and style transfer.
158
- - Edit the original prompt to regenerate, then switch between revisions on the same image card.
159
-
160
- <br />
161
-
162
- <div align="center">
163
- <img src="docs/assets/readme/regenerating.webp" alt="Image regeneration in progress" width="46%" />
164
- <img src="docs/assets/readme/revision-switcher.webp" alt="Switching between generated revisions on the same image card" width="46%" />
165
- <br />
166
- <sub>Regenerate in place after editing the prompt, then switch between previous results on the same image card.</sub>
167
- </div>
168
-
169
- <br />
170
-
171
- ### ✏️ From sketch to image: AI creative canvas
172
-
173
- Express your ideas on an infinite canvas and turn drafts, compositions, and thoughts into real images through conversation.
174
-
175
- - Freely sketch, add reference materials, and organize your ideas on the canvas.
176
- - Talk to the AI in natural language to turn a draft into a finished piece.
177
- - Keep editing, refining, and exploring new directions from existing results—your creative process is preserved so every exploration stays iterable.
178
-
179
- <br />
180
-
181
- <div align="center">
182
- <img src="docs/assets/readme/canvas-generate.webp" alt="Sketching on the infinite canvas and generating a final image through conversation" width="46%" />
183
- <img src="docs/assets/readme/canvas-edit.webp" alt="Continuing to edit and iterate through conversation based on existing results" width="46%" />
184
- <br />
185
- <sub>Left: Sketch and place reference images on the canvas, then generate through conversation. · Right: Keep iterating on existing results through conversation.</sub>
186
- </div>
187
-
188
- <br />
189
-
190
- ### 🎛️ Studio batch creation
191
-
192
- - Support multiple reference images, and generate multiple candidates at a time.
193
- - Control the Provider, model, aspect ratio, and quality, then save only the results you want.
194
-
195
- <br />
196
-
197
- <div align="center">
198
- <img src="docs/assets/readme/studio-workbench.webp" alt="dsh-image-gen Studio workbench" width="100%" />
199
- <br />
200
- <sub>Import references, control parameters, generate batches, select results, and save—all within one Studio.</sub>
201
- </div>
202
-
203
- <br />
204
-
205
- ### ⚖️ Side-by-side multi-model comparison
206
-
207
- Run the same prompt and reference images across multiple models, then compare and save the results on one canvas.
208
-
209
- <br />
210
-
211
- <div align="center">
212
- <img src="docs/assets/readme/multi-model-compare.webp" alt="Comparing the same prompt across multiple image models" width="100%" />
213
- <br />
214
- <sub>Compare results from different models on one canvas, then save the images you prefer in a batch.</sub>
215
- </div>
216
-
217
- <br />
218
-
219
- ### ✨ 500+ prompt inspiration examples
220
-
221
- - Browse and filter **500+ prompt examples**, then favorite, copy, or send them directly to Studio.
222
- - Images are cached locally, so browsing and learning consume no tokens or generation quota.
223
-
224
- <br />
225
-
226
- <div align="center">
227
- <img src="docs/assets/readme/inspiration-library.webp" alt="Prompt inspiration library" width="100%" />
228
- <br />
229
- <sub>Find inspiration first, then send a prompt to Studio. Browsing and copying from the local cache consume no generation quota.</sub>
230
- </div>
231
-
232
- <br />
233
-
234
- ### 🖼️ Gallery, favorites, and batch management
235
-
236
- - Manage images saved from chat and Studio in one place, isolated by workspace.
237
- - Search, filter, favorite, download, continue editing, regenerate, and batch-manage results.
238
-
239
- <br />
240
-
241
- <div align="center">
242
- <img src="docs/assets/readme/gallery-management.webp" alt="Gallery filtering, favorites, and batch management" width="100%" />
243
- <br />
244
- <sub>Filter, favorite, and batch-manage gallery items while keeping data isolated by workspace.</sub>
245
- </div>
246
-
247
- <br />
248
-
249
- ### 🧩 Multiple local ComfyUI workflows
250
-
251
- Bring private image generation on your local GPU directly into Agent conversations.
252
-
253
- - Import and manage multiple named workflows with prompt presets and common placeholders.
254
- - Let the Agent select a workflow by name for text-to-image or image-to-image generation in chat.
255
-
256
- > ComfyUI is not yet integrated into Studio or multi-model comparison.
257
-
258
- <br />
259
-
260
- <div align="center">
261
- <img src="docs/assets/readme/comfyui-workflows.webp" alt="Multiple named ComfyUI workflow settings" width="58%" />
262
- <br />
263
- <sub>Maintain independent workflows for different tasks and let the Agent select them precisely by name.</sub>
264
- </div>
265
-
266
- <br />
267
-
268
- ---
269
-
270
- ## Provider Support
271
-
272
- | Provider | Chat generation | Chat editing | Studio | Multi-model comparison |
273
- | :--- | :---: | :---: | :---: | :---: |
274
- | **Google Gemini** | ✅ | ✅ Multiple | ✅ | ✅ |
275
- | **OpenAI Images** | ✅ | ✅ Multiple | ✅ | ✅ |
276
- | **OpenAI Compatible (relay)** | ✅ | ✅ Multiple | ✅ | ✅ |
277
- | **ByteDance Seedream / Volcengine Ark** | ✅ | ✅ Multiple | ✅ | ✅ |
278
- | **Aliyun DashScope / Qwen Image** | ✅ | ✅ Multiple | ✅ | ✅ |
279
- | **xAI Grok Imagine** | ✅ | ⚠️ Limited | ✅ | ✅ |
280
- | **Zhipu GLM-Image** | ✅ | — | ✅ | ✅ |
281
- | **Local ComfyUI** | ✅ | ✅ Single | — | — |
282
- | **ChatGPT subscription (key-free)** | ✅ | ✅ Multiple | ✅ | ✅ |
283
- | **Grok subscription (key-free)** | ✅ | ✅ Multiple | ✅ | ✅ |
284
- | **Google subscription (key-free)** | ✅ | ✅ Multiple | ✅ | ✅ |
285
-
286
- > 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.
287
- > 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.
288
- > 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 with channel-default parameters (up to 5 reference images).
289
-
290
- <details>
291
- <summary><strong>Current default models and endpoints (all configurable)</strong></summary>
292
-
293
- | Provider | Default model | Default Endpoint / Base URL |
294
- | :--- | :--- | :--- |
295
- | Google Gemini | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
296
- | OpenAI Images | `gpt-image-2` | `https://api.openai.com/v1` |
297
- | OpenAI Compatible | Custom | Custom Base URL |
298
- | ByteDance Seedream | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
299
- | Aliyun DashScope | `qwen-image-3.0` | `https://dashscope.aliyuncs.com/api/v1` |
300
- | xAI Grok Imagine | `grok-imagine-image` | `https://api.x.ai/v1` |
301
- | Zhipu GLM-Image | `glm-image` | `https://open.bigmodel.cn/api/paas/v4` |
302
- | Local ComfyUI | Imported API Workflow | `http://127.0.0.1:8188` |
303
- | ChatGPT subscription | `gpt-image-2.5-flare` (channel-fixed) | Account sign-in, no configuration |
304
- | Grok subscription | `grok-imagine-image-2.0` (channel-fixed) | Account sign-in, no configuration |
305
- | Google subscription | `gemini-3-pro-image` (channel-fixed) | Account sign-in, no configuration |
306
-
307
- </details>
308
-
309
- ---
310
-
311
- ## Data and Privacy
312
-
313
- - **BYOK:** API keys are stored through the DSH Credentials service and are never displayed in plaintext on the settings page.
314
- - **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.
315
- - **Cloud requests:** The prompt and reference images used for a request are sent to the selected Provider. Follow that Provider's terms of service.
316
- - **Local ComfyUI:** Requests are sent to the configured ComfyUI address.
317
- - **Workspace files:** When workspace saving is enabled, chat results are written to disk; Studio saves only the candidates you select.
318
- - **Gallery and favorites:** Gallery metadata and favorite state are stored in the current browser's local storage.
319
- - **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.
320
-
321
- ## FAQ
322
-
323
- <details>
324
- <summary><strong>What should I do if “Image Generation” is missing after installation?</strong></summary>
325
-
326
- The settings entry depends on the DSH version: 0.1.6 and newer place it at **Settings → Plugins → Image Generation**, while 0.1.5 and earlier place it at **Settings → Plugins → Plugin Configuration → Image Generation**.
327
-
328
- If it is missing in both places, fully restart the current DSH Profile, then inspect the plugin configuration:
329
-
330
- ```bash
331
- dsh --profile web --dump-config
332
- ```
333
-
334
- 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.
335
-
336
- </details>
337
-
338
- <details>
339
- <summary><strong>Where are generated images saved?</strong></summary>
340
-
341
- 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.
342
-
343
- </details>
344
-
345
- <details>
346
- <summary><strong>Why is ComfyUI not available in Studio?</strong></summary>
347
-
348
- 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.
349
-
350
- </details>
351
-
352
- <details>
353
- <summary><strong>Does deleting an item from the gallery remove its chat message?</strong></summary>
354
-
355
- 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.
356
-
357
- </details>
358
-
359
- <details>
360
- <summary><strong>How do I upgrade?</strong></summary>
361
-
362
- ```bash
363
- pnpm dsh plugin --profile web add dsh-image-gen@latest
364
- ```
365
-
366
- Restart the corresponding DSH Profile after upgrading.
367
-
368
- </details>
369
-
370
- ---
371
-
372
- ## Local Development
373
-
374
- ```bash
375
- git clone https://github.com/shanliuling/dsh-image-gen.git
376
- cd dsh-image-gen
377
-
378
- pnpm install
379
- pnpm run typecheck
380
- pnpm test
381
- pnpm run build
382
- pnpm run pack:check
383
- ```
384
-
385
- Feedback is welcome through [Issues](https://github.com/shanliuling/dsh-image-gen/issues). Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a Pull Request.
386
-
387
- ## License
388
-
389
- This project is open source under the [Apache License 2.0](LICENSE).
390
-
391
- <div align="center">
392
-
393
- If `dsh-image-gen` improves your workflow, consider giving the project a ⭐ **Star** to support continued maintenance.
394
-
395
- **[View Releases](https://github.com/shanliuling/dsh-image-gen/releases) · [Open an Issue](https://github.com/shanliuling/dsh-image-gen/issues) · [Contribute](CONTRIBUTING.md)**
396
-
397
- </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
+ ### 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="#quick-start">Quick Start</a> ·
27
+ <a href="#core-capabilities">Core Capabilities</a> ·
28
+ <a href="#provider-support">Provider Support</a> ·
29
+ <a href="#faq">FAQ</a>
30
+ </p>
31
+
32
+ <br />
33
+
34
+ <img src="docs/assets/readme/canvas-generate.webp" alt="Sketching on the infinite canvas and generating a final image through conversation" width="46%" />
35
+ <img src="docs/assets/readme/canvas-edit.webp" alt="Continuing to edit and iterate through conversation based on existing results" width="46%" />
36
+ <br />
37
+ <sub>Left: Sketch and place reference images on the canvas, then generate through conversation. · Right: Keep iterating on existing results through conversation.</sub>
38
+
39
+ <br />
40
+
41
+ <img src="docs/assets/readme/chat-generate.webp" alt="Generating images directly in conversation" width="46%" />
42
+ <img src="docs/assets/readme/other-features.webp" alt="Studio batch creation, inspiration library, gallery and more" width="46%" />
43
+ <br />
44
+ <sub>Left: Describe and generate images right in the conversation. · Right: Studio batch creation, inspiration library, gallery, and more.</sub>
45
+
46
+ </div>
47
+
48
+ **A complete AI image creation workflow for DeepSeek Harness.**
49
+
50
+ `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.
51
+
52
+ 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.
53
+
54
+ > **Already paying for ChatGPT, Grok, or Google? Just sign in and start generating—no separate API key purchase needed.**
55
+
56
+ Supports: Gemini · OpenAI / Compatible · Seedream · DashScope · Grok Imagine · GLM-Image · Local ComfyUI
57
+
58
+ ```bash
59
+ pnpm dsh plugin --profile web add dsh-image-gen@latest
60
+ ```
61
+
62
+ > **Update notice:** This release includes major changes. Existing users should update to the latest version.
63
+
64
+ <img src="docs/assets/readme/workflow-overview-en.webp" alt="dsh-image-gen complete AI image creation workflow" width="100%" />
65
+
66
+ ---
67
+
68
+ ## One plugin, the complete AI image creation workflow
69
+
70
+ | Entry | Best for | What you can do |
71
+ | :--- | :--- | :--- |
72
+ | 💬 **Chat** | Expressing ideas quickly | Text-to-image, image-to-image, continuous editing, and revision iteration |
73
+ | ✏️ **Canvas** | Expressing visual creativity | Sketch-to-image, reference composition, spatial creation, and continuous refinement |
74
+ | 🎛️ **Studio** | Fine-grained control over creation parameters | Batch generation, multi-image reference, and advanced parameter tuning |
75
+ | ✨ **Inspiration** | Finding creative direction | Prompt examples, style exploration, and one-click reuse |
76
+ | 🖼️ **Gallery** | Managing generated results | Search, favorite, download, and reuse |
77
+
78
+ ---
79
+
80
+ ## Quick Start
81
+
82
+ ### 1. Install the plugin
83
+
84
+ Requirements: DeepSeek Harness stable version, Node.js `^22.19.0` or `>= 24.0.0`.
85
+
86
+ Run this command from your DeepSeek Harness project root:
87
+
88
+ ```bash
89
+ pnpm dsh plugin --profile web add dsh-image-gen@latest
90
+ ```
91
+
92
+ > 💬 **Power-user tip:** You can also send this directly to the Agent in a DSH chat:<br />
93
+ > `Install the image generation plugin by running this command in the terminal: pnpm dsh plugin --profile web add dsh-image-gen@latest`
94
+
95
+ <details>
96
+ <summary><strong>Alternative installation methods (global / GitHub / local development)</strong></summary>
97
+
98
+ ```bash
99
+ # If dsh is installed globally:
100
+ dsh plugin --profile web add dsh-image-gen@latest
101
+
102
+ # Install the latest source directly from GitHub:
103
+ pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git
104
+
105
+ # Clone the repository and install it for local development:
106
+ git clone https://github.com/shanliuling/dsh-image-gen.git
107
+ pnpm dsh plugin --profile web add ./dsh-image-gen
108
+ ```
109
+
110
+ </details>
111
+
112
+ ### 2. Configure a Provider
113
+
114
+ After restarting DSH, open:
115
+
116
+ **Settings → Plugins → Image Generation**
117
+
118
+ > On DSH 0.1.5 and earlier the entry is **Settings → Plugins → Plugin Configuration → Image Generation**; the same plugin build supports both.
119
+
120
+ 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.
121
+
122
+ 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.
123
+
124
+ ### 3. Start creating
125
+
126
+ Describe the image you want directly in chat:
127
+
128
+ ```text
129
+ Create a cinematic cyberpunk cat on a neon street at night, 16:9.
130
+ ```
131
+
132
+ You can also upload a reference image directly for style transfer or editing:
133
+
134
+ ```text
135
+ Keep the character and composition unchanged, then add black sunglasses to the cat.
136
+ ```
137
+
138
+ <br />
139
+
140
+ <div align="center">
141
+ <img src="docs/assets/readme/provider-settings.webp" alt="DSH Plugin Settings" width="46%" />
142
+ <img src="docs/assets/readme/chat-example.webp" alt="Chat generation and editing example" width="46%" />
143
+ <br />
144
+ <sub>Left: Provider Settings · Right: In-chat generation, editing, and continuous refinement.</sub>
145
+ </div>
146
+
147
+ <br />
148
+
149
+ For more precise parameter control, open **Gallery** from the conversation header, then switch between **Gallery / Studio / Inspiration / Favorites**.
150
+
151
+ ---
152
+
153
+ ## Core Capabilities
154
+
155
+ ### 💬 In-chat generation, editing, and revision switching
156
+
157
+ - Use natural language for text-to-image, image-to-image, multi-image reference, and style transfer.
158
+ - Edit the original prompt to regenerate, then switch between revisions on the same image card.
159
+
160
+ <br />
161
+
162
+ <div align="center">
163
+ <img src="docs/assets/readme/regenerating.webp" alt="Image regeneration in progress" width="46%" />
164
+ <img src="docs/assets/readme/revision-switcher.webp" alt="Switching between generated revisions on the same image card" width="46%" />
165
+ <br />
166
+ <sub>Regenerate in place after editing the prompt, then switch between previous results on the same image card.</sub>
167
+ </div>
168
+
169
+ <br />
170
+
171
+ ### ✏️ From sketch to image: AI creative canvas
172
+
173
+ Express your ideas on an infinite canvas and turn drafts, compositions, and thoughts into real images through conversation.
174
+
175
+ - Freely sketch, add reference materials, and organize your ideas on the canvas.
176
+ - Talk to the AI in natural language to turn a draft into a finished piece.
177
+ - Keep editing, refining, and exploring new directions from existing results—your creative process is preserved so every exploration stays iterable.
178
+
179
+ <br />
180
+
181
+ <div align="center">
182
+ <img src="docs/assets/readme/canvas-generate.webp" alt="Sketching on the infinite canvas and generating a final image through conversation" width="46%" />
183
+ <img src="docs/assets/readme/canvas-edit.webp" alt="Continuing to edit and iterate through conversation based on existing results" width="46%" />
184
+ <br />
185
+ <sub>Left: Sketch and place reference images on the canvas, then generate through conversation. · Right: Keep iterating on existing results through conversation.</sub>
186
+ </div>
187
+
188
+ <br />
189
+
190
+ ### 🎛️ Studio batch creation
191
+
192
+ - Support multiple reference images, and generate multiple candidates at a time.
193
+ - Control the Provider, model, aspect ratio, and quality, then save only the results you want.
194
+
195
+ <br />
196
+
197
+ <div align="center">
198
+ <img src="docs/assets/readme/studio-workbench.webp" alt="dsh-image-gen Studio workbench" width="100%" />
199
+ <br />
200
+ <sub>Import references, control parameters, generate batches, select results, and save—all within one Studio.</sub>
201
+ </div>
202
+
203
+ <br />
204
+
205
+ ### ⚖️ Side-by-side multi-model comparison
206
+
207
+ Run the same prompt and reference images across multiple models, then compare and save the results on one canvas.
208
+
209
+ <br />
210
+
211
+ <div align="center">
212
+ <img src="docs/assets/readme/multi-model-compare.webp" alt="Comparing the same prompt across multiple image models" width="100%" />
213
+ <br />
214
+ <sub>Compare results from different models on one canvas, then save the images you prefer in a batch.</sub>
215
+ </div>
216
+
217
+ <br />
218
+
219
+ ### ✨ 500+ prompt inspiration examples
220
+
221
+ - Browse and filter **500+ prompt examples**, then favorite, copy, or send them directly to Studio.
222
+ - Images are cached locally, so browsing and learning consume no tokens or generation quota.
223
+
224
+ <br />
225
+
226
+ <div align="center">
227
+ <img src="docs/assets/readme/inspiration-library.webp" alt="Prompt inspiration library" width="100%" />
228
+ <br />
229
+ <sub>Find inspiration first, then send a prompt to Studio. Browsing and copying from the local cache consume no generation quota.</sub>
230
+ </div>
231
+
232
+ <br />
233
+
234
+ ### 🖼️ Gallery, favorites, and batch management
235
+
236
+ - Manage images saved from chat and Studio in one place, isolated by workspace.
237
+ - Search, filter, favorite, download, continue editing, regenerate, and batch-manage results.
238
+
239
+ <br />
240
+
241
+ <div align="center">
242
+ <img src="docs/assets/readme/gallery-management.webp" alt="Gallery filtering, favorites, and batch management" width="100%" />
243
+ <br />
244
+ <sub>Filter, favorite, and batch-manage gallery items while keeping data isolated by workspace.</sub>
245
+ </div>
246
+
247
+ <br />
248
+
249
+ ### 🧩 Multiple local ComfyUI workflows
250
+
251
+ Bring private image generation on your local GPU directly into Agent conversations.
252
+
253
+ - Import and manage multiple named workflows with prompt presets and common placeholders.
254
+ - Let the Agent select a workflow by name for text-to-image or image-to-image generation in chat.
255
+
256
+ > ComfyUI is not yet integrated into Studio or multi-model comparison.
257
+
258
+ <br />
259
+
260
+ <div align="center">
261
+ <img src="docs/assets/readme/comfyui-workflows.webp" alt="Multiple named ComfyUI workflow settings" width="58%" />
262
+ <br />
263
+ <sub>Maintain independent workflows for different tasks and let the Agent select them precisely by name.</sub>
264
+ </div>
265
+
266
+ <br />
267
+
268
+ ---
269
+
270
+ ## Provider Support
271
+
272
+ | Provider | Chat generation | Chat editing | Studio | Multi-model comparison |
273
+ | :--- | :---: | :---: | :---: | :---: |
274
+ | **Google Gemini** | ✅ | ✅ Multiple | ✅ | ✅ |
275
+ | **OpenAI Images** | ✅ | ✅ Multiple | ✅ | ✅ |
276
+ | **OpenAI Compatible (relay)** | ✅ | ✅ Multiple | ✅ | ✅ |
277
+ | **ByteDance Seedream / Volcengine Ark** | ✅ | ✅ Multiple | ✅ | ✅ |
278
+ | **Aliyun DashScope / Qwen Image** | ✅ | ✅ Multiple | ✅ | ✅ |
279
+ | **xAI Grok Imagine** | ✅ | ⚠️ Limited | ✅ | ✅ |
280
+ | **Zhipu GLM-Image** | ✅ | — | ✅ | ✅ |
281
+ | **Local ComfyUI** | ✅ | ✅ Single | — | — |
282
+ | **ChatGPT subscription (key-free)** | ✅ | ✅ Multiple | ✅ | ✅ |
283
+ | **Grok subscription (key-free)** | ✅ | ✅ Multiple | ✅ | ✅ |
284
+ | **Google subscription (key-free)** | ✅ | ✅ Multiple | ✅ | ✅ |
285
+
286
+ > 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.
287
+ > 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.
288
+ > 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.
289
+
290
+ <details>
291
+ <summary><strong>Current default models and endpoints (all configurable)</strong></summary>
292
+
293
+ | Provider | Default model | Default Endpoint / Base URL |
294
+ | :--- | :--- | :--- |
295
+ | Google Gemini | `gemini-3.1-flash-image` | `https://generativelanguage.googleapis.com/v1beta/interactions` |
296
+ | OpenAI Images | `gpt-image-2` | `https://api.openai.com/v1` |
297
+ | OpenAI Compatible | Custom | Custom Base URL |
298
+ | ByteDance Seedream | `doubao-seedream-5-0-260128` | `https://ark.cn-beijing.volces.com/api/v3` |
299
+ | Aliyun DashScope | `qwen-image-3.0` | `https://dashscope.aliyuncs.com/api/v1` |
300
+ | xAI Grok Imagine | `grok-imagine-image` | `https://api.x.ai/v1` |
301
+ | Zhipu GLM-Image | `glm-image` | `https://open.bigmodel.cn/api/paas/v4` |
302
+ | Local ComfyUI | Imported API Workflow | `http://127.0.0.1:8188` |
303
+ | ChatGPT subscription | `gpt-image-2.5-flare` (channel-fixed) | Account sign-in, no configuration |
304
+ | Grok subscription | `grok-imagine-image-2.0` (channel-fixed) | Account sign-in, no configuration |
305
+ | Google subscription | `gemini-3.1-flash-image` (channel-fixed) | Account sign-in, no configuration |
306
+
307
+ </details>
308
+
309
+ <details>
310
+ <summary><strong>Aspect ratios and quality tiers per Provider</strong></summary>
311
+
312
+ | Provider | Aspect ratios | Quality tiers |
313
+ | :--- | :--- | :--- |
314
+ | 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 |
315
+ | OpenAI Images | 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 | auto / low / medium / high |
316
+ | OpenAI Compatible | Driven by `openaiCompatSizes` (default 1:1 · 3:2 · 2:3) | Same table (default standard) |
317
+ | ByteDance Seedream | auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 | 2K / 3K / 4K |
318
+ | Aliyun DashScope | 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 | standard |
319
+ | xAI Grok Imagine | auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 | 1K / 2K |
320
+ | Zhipu GLM-Image | 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 | hd |
321
+ | ChatGPT subscription | auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 | auto / low / medium / high / xhigh / max |
322
+ | Grok subscription | auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 | 1K / 2K |
323
+ | 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) |
324
+
325
+ > 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.
326
+ > OpenAI Compatible (relay) pickers are driven by the `openaiCompatSizes` setting, shaped as ratio → tier → pixels, e.g. `{ "16:9": { "2K": "2048x1152" } }`; an empty table keeps the legacy 1:1 / 3:2 / 2:3 + standard behavior.
327
+
328
+ </details>
329
+
330
+ ---
331
+
332
+ ## Data and Privacy
333
+
334
+ - **BYOK:** API keys are stored through the DSH Credentials service and are never displayed in plaintext on the settings page.
335
+ - **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.
336
+ - **Cloud requests:** The prompt and reference images used for a request are sent to the selected Provider. Follow that Provider's terms of service.
337
+ - **Local ComfyUI:** Requests are sent to the configured ComfyUI address.
338
+ - **Workspace files:** When workspace saving is enabled, chat results are written to disk; Studio saves only the candidates you select.
339
+ - **Gallery and favorites:** Gallery metadata and favorite state are stored in the current browser's local storage.
340
+ - **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.
341
+
342
+ ## FAQ
343
+
344
+ <details>
345
+ <summary><strong>What should I do if “Image Generation” is missing after installation?</strong></summary>
346
+
347
+ The settings entry depends on the DSH version: 0.1.6 and newer place it at **Settings → Plugins → Image Generation**, while 0.1.5 and earlier place it at **Settings → Plugins → Plugin Configuration → Image Generation**.
348
+
349
+ If it is missing in both places, fully restart the current DSH Profile, then inspect the plugin configuration:
350
+
351
+ ```bash
352
+ dsh --profile web --dump-config
353
+ ```
354
+
355
+ 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.
356
+
357
+ </details>
358
+
359
+ <details>
360
+ <summary><strong>Where are generated images saved?</strong></summary>
361
+
362
+ 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.
363
+
364
+ </details>
365
+
366
+ <details>
367
+ <summary><strong>Why is ComfyUI not available in Studio?</strong></summary>
368
+
369
+ 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.
370
+
371
+ </details>
372
+
373
+ <details>
374
+ <summary><strong>Does deleting an item from the gallery remove its chat message?</strong></summary>
375
+
376
+ 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.
377
+
378
+ </details>
379
+
380
+ <details>
381
+ <summary><strong>How do I upgrade?</strong></summary>
382
+
383
+ ```bash
384
+ pnpm dsh plugin --profile web add dsh-image-gen@latest
385
+ ```
386
+
387
+ Restart the corresponding DSH Profile after upgrading.
388
+
389
+ </details>
390
+
391
+ ---
392
+
393
+ ## Local Development
394
+
395
+ ```bash
396
+ git clone https://github.com/shanliuling/dsh-image-gen.git
397
+ cd dsh-image-gen
398
+
399
+ pnpm install
400
+ pnpm run typecheck
401
+ pnpm test
402
+ pnpm run build
403
+ pnpm run pack:check
404
+ pnpm run test:package
405
+ ```
406
+
407
+ 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.
408
+
409
+ `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.
410
+
411
+ Feedback is welcome through [Issues](https://github.com/shanliuling/dsh-image-gen/issues). Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a Pull Request.
412
+
413
+ ## License
414
+
415
+ This project is open source under the [Apache License 2.0](LICENSE).
416
+
417
+ <div align="center">
418
+
419
+ If `dsh-image-gen` improves your workflow, consider giving the project a ⭐ **Star** to support continued maintenance.
420
+
421
+ **[View Releases](https://github.com/shanliuling/dsh-image-gen/releases) · [Open an Issue](https://github.com/shanliuling/dsh-image-gen/issues) · [Contribute](CONTRIBUTING.md)**
422
+
423
+ </div>