Skip to content
dsh-market Browse plugins GitHub 中文

shanliuling/dsh-image-gen

Native conversational image generation for DeepSeek Harness: ask the agent to create an image, and it handles generation and keeps the result directly in the conversation.

Stars ★ 587 Category Workflow & Automation Listed 2026-08-19 npm dsh-image-gen

Install

Inside DeepSeek Harness, with dsh-market

dsh plugin --profile web add dshmarket

Or from the command line

dsh plugin --profile web add dsh-image-gen

Installing runs third-party code with your own permissions — it can read your files, use your credentials and reach the network. Review the source first, and pin a commit (github:owner/repo#sha) when you can.

README

🎨 dsh-image-gen

Native AI image creation suite for DeepSeek Harness

A complete AI image creation workflow for DeepSeek Harness.

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.

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.

Already paying for ChatGPT, Grok, or Google? Just sign in and start generating—no separate API key purchase needed.

Supports: Gemini · OpenAI / Compatible · Seedream · DashScope · Grok Imagine · GLM-Image · Local ComfyUI

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

Update notice: This release includes major changes. Existing users should update to the latest version.


One plugin, the complete AI image creation workflow

Entry Best for What you can do
💬 Chat Expressing ideas quickly Text-to-image, image-to-image, continuous editing, and revision iteration
✏️ Canvas Expressing visual creativity Sketch-to-image, reference composition, spatial creation, and continuous refinement
🎛️ Studio Fine-grained control over creation parameters Batch generation, multi-image reference, and advanced parameter tuning
✨ Inspiration Finding creative direction Prompt examples, style exploration, and one-click reuse
🖼️ Gallery Managing generated results Search, favorite, download, and reuse

Quick Start

1. Install the plugin

Requirements: DeepSeek Harness stable version, Node.js ^22.19.0 or >= 24.0.0.

Run this command from your DeepSeek Harness project root:

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

💬 Power-user tip: You can also send this directly to the Agent in a DSH chat: Install the image generation plugin by running this command in the terminal: pnpm dsh plugin --profile web add dsh-image-gen@latest

# If dsh is installed globally:
dsh plugin --profile web add dsh-image-gen@latest

# Install the latest source directly from GitHub:
pnpm dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git

# Clone the repository and install it for local development:
git clone https://github.com/shanliuling/dsh-image-gen.git
pnpm dsh plugin --profile web add ./dsh-image-gen

2. Configure a Provider

After restarting DSH, open:

Settings → Plugins → Image Generation

On DSH 0.1.5 and earlier the entry is Settings → Plugins → Plugin Configuration → Image Generation; the same plugin build supports both.

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.

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.

3. Start creating

Describe the image you want directly in chat:

Create a cinematic cyberpunk cat on a neon street at night, 16:9.

You can also upload a reference image directly for style transfer or editing:

Keep the character and composition unchanged, then add black sunglasses to the cat.

For more precise parameter control, open Gallery from the conversation header, then switch between Gallery / Studio / Inspiration / Favorites.


Core Capabilities

💬 In-chat generation, editing, and revision switching

  • Use natural language for text-to-image, image-to-image, multi-image reference, and style transfer.
  • Edit the original prompt to regenerate, then switch between revisions on the same image card.

✏️ From sketch to image: AI creative canvas

Express your ideas on an infinite canvas and turn drafts, compositions, and thoughts into real images through conversation.

  • Freely sketch, add reference materials, and organize your ideas on the canvas.
  • Talk to the AI in natural language to turn a draft into a finished piece.
  • Keep editing, refining, and exploring new directions from existing results—your creative process is preserved so every exploration stays iterable.

🎛️ Studio batch creation

  • Support multiple reference images, and generate multiple candidates at a time.
  • Control the Provider, model, aspect ratio, and quality, then save only the results you want.

⚖️ Side-by-side multi-model comparison

Run the same prompt and reference images across multiple models, then compare and save the results on one canvas.

✨ 500+ prompt inspiration examples

  • Browse and filter 500+ prompt examples, then favorite, copy, or send them directly to Studio.
  • Images are cached locally, so browsing and learning consume no tokens or generation quota.

🖼️ Gallery, favorites, and batch management

  • Manage images saved from chat and Studio in one place, isolated by workspace.
  • Search, filter, favorite, download, continue editing, regenerate, and batch-manage results.

🧩 Multiple local ComfyUI workflows

Bring private image generation on your local GPU directly into Agent conversations.

  • Import and manage multiple named workflows with prompt presets and common placeholders.
  • Let the Agent select a workflow by name for text-to-image or image-to-image generation in chat.

ComfyUI is not yet integrated into Studio or multi-model comparison.


Provider Support

Provider Chat generation Chat editing Studio Multi-model comparison
Google Gemini ✅ ✅ Multiple ✅ ✅
OpenAI Images ✅ ✅ Multiple ✅ ✅
OpenAI Compatible (relay) ✅ ✅ Multiple ✅ ✅
ByteDance Seedream / Volcengine Ark ✅ ✅ Multiple ✅ ✅
Aliyun DashScope / Qwen Image ✅ ✅ Multiple ✅ ✅
xAI Grok Imagine ✅ ⚠️ Limited ✅ ✅
Zhipu GLM-Image ✅ — ✅ ✅
Local ComfyUI ✅ ✅ Single — —
ChatGPT subscription (key-free) ✅ ✅ Multiple ✅ ✅
Grok subscription (key-free) ✅ ✅ Multiple ✅ ✅
Google subscription (key-free) ✅ ✅ Multiple ✅ ✅

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. 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. 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.

Provider Default model Default Endpoint / Base URL
Google Gemini gemini-3.1-flash-image https://generativelanguage.googleapis.com/v1beta/interactions
OpenAI Images gpt-image-2 https://api.openai.com/v1
OpenAI Compatible Custom Custom Base URL
ByteDance Seedream doubao-seedream-5-0-260128 https://ark.cn-beijing.volces.com/api/v3
Aliyun DashScope qwen-image-3.0 https://dashscope.aliyuncs.com/api/v1
xAI Grok Imagine grok-imagine-image https://api.x.ai/v1
Zhipu GLM-Image glm-image https://open.bigmodel.cn/api/paas/v4
Local ComfyUI Imported API Workflow http://127.0.0.1:8188
ChatGPT subscription gpt-image-2.5-flare (channel-fixed) Account sign-in, no configuration
Grok subscription grok-imagine-image-2.0 (channel-fixed) Account sign-in, no configuration
Google subscription gemini-3.1-flash-image (channel-fixed) Account sign-in, no configuration
Provider Aspect ratios Quality tiers
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
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
OpenAI Compatible Driven by openaiCompatSizes (default 1:1 · 3:2 · 2:3) Resolution from the size table; separate configurable quality, omitted by default
ByteDance Seedream auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 2K / 3K / 4K
Aliyun DashScope 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 standard
xAI Grok Imagine auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 1K / 2K
Zhipu GLM-Image 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 hd
ChatGPT subscription auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 auto / low / medium / high / xhigh / max
Grok subscription auto · 1:1 · 3:2 · 2:3 · 4:3 · 3:4 · 16:9 · 9:16 · 21:9 1K / 2K
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)

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. Google subscription discovers account projects with valid platform enums and includes the ordinary daily endpoint as a compatibility fallback. If discovery 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. 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. 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. Older GPT Image models retain their three standard sizes. 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. “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. 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.


Data and Privacy

  • BYOK: API keys are stored through the DSH Credentials service and are never displayed in plaintext on the settings page.
  • 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.
  • Cloud requests: The prompt and reference images used for a request are sent to the selected Provider. Follow that Provider's terms of service.
  • Local ComfyUI: Requests are sent to the configured ComfyUI address.
  • Workspace files: When workspace saving is enabled, chat results are written to disk; Studio saves only the candidates you select.
  • Gallery and favorites: Gallery metadata and favorite state are stored in the current browser's local storage.
  • 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.

FAQ

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.

If it is missing in both places, fully restart the current DSH Profile, then inspect the plugin configuration:

dsh --profile web --dump-config

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.

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.

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.

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.

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

Restart the corresponding DSH Profile after upgrading.


Local Development

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

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

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.

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.

Feedback is welcome through Issues. Read CONTRIBUTING.md before opening a Pull Request.

Acknowledgements

  • AtomGit: Hosts a copy of the project for users in China to browse and download the source code.

License

This project is open source under the Apache License 2.0.

If dsh-image-gen improves your workflow, consider giving the project a ⭐ Star to support continued maintenance.

View Releases · Open an Issue · Contribute

Content from the project README on GitHub ↗

Comments

Comments live in GitHub Discussions. Sign in with GitHub to post or react.