What Is dsh-image-gen? In-Chat Image Generation and Editing

GuidePublished 2026-09-02Author: DeepSeek Plugin Market
dsh-image-genDeepSeek HarnessDSH Plugintext-to-imageimage generation
dsh-image-gen is a DeepSeek Harness (DSH) plugin that adds native text-to-image, image-to-image, and multi-turn editing to conversations.

dsh-image-gen is an open-source image generation and editing plugin built for DeepSeek Harness (DSH) that adds native text-to-image, image-to-image, and multi-turn editing to conversations, so you can ask the agent to draw and keep refining in natural language. This article covers what dsh-image-gen is, its core features, complete install/update/uninstall commands, and typical usage.

What Is dsh-image-gen?

dsh-image-gen solves the problem that DSH agents can call tools but cannot produce images directly in chat: it turns image generation and editing into a native in-conversation capability that works once you configure a provider. The following positioning and facts come from the official README (source):

dsh-image-gen (GitHub repository shanliuling/dsh-image-gen) is maintained by shanliuling and open-sourced under the MIT license; it is a tool plugin in the DSH Plugin ecosystem. It adds two tools, generate_image and edit_image, on top of DeepSeek Harness so the agent treats drawing and editing as ordinary tool calls; conversation and model behavior stay with DSH, while the plugin only handles the image step. It connects to cloud backends (Gemini, OpenAI Images / Compatible, Seedream, DashScope) and a local ComfyUI, and collects historical images into the Gallery tab. The plugin is BYOK: API keys, providers, models, and endpoints are configured directly in DSH settings with no separate key file.

What Are the Core Features of dsh-image-gen?

Its core capabilities revolve around in-chat generation, iterative editing, gallery management, multiple backends, native settings, and workspace saving, pulling the whole image workflow into the DSH conversation. These features come from the official README (source):

  • Native in-chat generation and editing: generate images directly in DSH conversations and modify existing ones.
  • Multi-turn iterative editing: reuse uploaded images, historical generations, and previous edit results in the same session.
  • Gallery and image tools: automatically collect historical images with search, filter, fullscreen preview, copy, download, and delete.
  • Multi-provider support: compatible with Google Gemini, OpenAI Images / Compatible, ByteDance Seedream, Aliyun DashScope, and local ComfyUI workflows.
  • BYOK and native settings: configure API keys, providers, models, and endpoints directly in DSH settings.
  • Session and workspace saving: images integrate with DSH Attachment / Conversation and auto-save to the current workspace.

How to Install and Enable dsh-image-gen?

Installing dsh-image-gen has two paths: install the latest from npm, or build from GitHub source; then configure a provider and API key under Settings → Plugins → Image generation to start generating. Commands come from the official README (source):

1. Install from npm (recommended) — run this in your DeepSeek Harness project root to add it to the web profile:

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

Wait for the install to finish, then confirm it is enabled under Settings → Plugins.

2. Install from GitHub source (optional) — use this to audit the source or try unreleased changes:

bash
dsh plugin --profile web add git+https://github.com/shanliuling/dsh-image-gen.git

3. Configure a provider and API key — open the DSH web page and go to Settings → Plugins → Image generation; pick a provider, enter the API key for cloud services, or the address plus workflow JSON for local ComfyUI.

4. Start generating in chat — type an image prompt and the agent calls the generate_image tool and returns the image:

text
Generate a minimalist modern living room illustration.

5. Update the plugin — re-run the npm install command to move to the latest version:

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

6. Uninstall the plugin — remove it from host plugin management, or run the remove command:

bash
dsh plugin remove dsh-image-gen

Typical dsh-image-gen Usage

dsh-image-gen works once configured: set a provider, then generate and edit with natural language in chat while all historical images collect in the gallery. The steps come from the official README (source):

1. Configure an image provider — open DSH settings → Plugins → Image generation, pick a provider and fill the API key; ComfyUI users import an API Format workflow with {{prompt}} as the prompt placeholder.

2. Text-to-image — just ask in the chat box:

text
Draw a cyberpunk cat on a rainy neon street.

3. Continue editing the previous image — reuse the current session's image and let the agent call edit_image:

text
Add floor-to-ceiling windows to the last image and change the view to snowy mountains.

4. Browse and manage the gallery — click the Gallery tab in the conversation top bar to view, search, preview, download, or delete historical images.

5. Generate locally with ComfyUI — ComfyUI supports both text-to-image and image-to-image; after importing multiple named workflows, the agent can pick one by name when calling the tool.

dsh-image-gen Troubleshooting

The most common dsh-image-gen problems are an invalid API key, an unreachable ComfyUI address, and a malformed workflow JSON placeholder; fix them by checking the key, the address, and the placeholder syntax respectively. Guidance comes from the official README (source):

1. Invalid API key — symptom: generation returns an authentication error. Cause: the cloud provider's API key is missing or expired. Fix: re-enter the correct key under Settings → Plugins → Image generation and save.

2. ComfyUI address unreachable — symptom: the local backend times out or fails to connect. Cause: ComfyUI is not running, or the address/port is wrong. Fix: confirm the local loopback address and port (default 8188) is reachable, then import the workflow JSON:

bash
curl http://127.0.0.1:8188/system_stats

3. Malformed workflow JSON — symptom: ComfyUI generation fails. Cause: the prompt placeholder is not {{prompt}}, or the image-to-image workflow's {{image}} appears more than once. Fix: check the placeholder syntax and make sure {{image}} appears only once.

Use Cases and Notes

dsh-image-gen suits heavy DSH users who want to generate and edit images directly in conversation, from cloud Gemini or OpenAI to local ComfyUI, with all historical images searchable in one place. Use cases and limits come from the official README (source):

Typical scenarios include: quick in-chat generation — ask the agent for an image in one sentence without switching tools; multi-turn creative iteration — keep refining the previous image until it looks right; local ComfyUI generation — use your own workflow to generate on-device without data leaving the machine; and gallery review — search and manage all historical images in one place. Limits worth noting: cloud providers are BYOK, so you need your own API key for the matching service; local ComfyUI must be set up and given an API Format workflow; images save to the current workspace by default, which can be disabled or redirected; and the plugin handles only the image generation and editing step while conversation, tools, and models remain managed by DeepSeek Harness itself.

dsh-image-gen is an MIT-licensed open-source project maintained by shanliuling, evolving continuously as an in-chat image plugin for DeepSeek Harness. For the full feature list, screenshots, and plugin details, visit the dsh-image-gen plugin page on this site: dsh-image-gen.

This page is an independent guide rewritten from the plugin's official README — for the authoritative documentation and the latest changes, defer to the source: shanliuling/dsh-image-gen. A plugin is third-party code that runs on your machine once installed; inclusion is not an endorsement — review the source before installing.

FAQ

How do I configure local ComfyUI as the image generation backend?

dsh-image-gen lets you pick Local ComfyUI under Settings → Plugins → Image generation, enter the local loopback address (default port 8188), and import an API Format Workflow JSON using {{prompt}} for the prompt and {{image}} for image-to-image.

Which image generation providers does dsh-image-gen support?

dsh-image-gen supports Google Gemini, OpenAI Images, OpenAI Compatible, ByteDance Seedream, Aliyun DashScope, and local ComfyUI. Cloud services need an API key, ComfyUI needs a workflow JSON, and each provider's default model is listed in the settings panel.

How does dsh-image-gen do multi-turn editing and reuse generated images?

dsh-image-gen reuses uploaded images, historical generations, and the previous edit result within the same session. Say 'add floor-to-ceiling windows to the last image' and the agent calls edit_image to keep refining the previous image.

Where are generated images saved and how do I manage them?

dsh-image-gen integrates images with DSH Attachment / Conversation and saves them to the current workspace by default (configurable or off). All historical images live in the Gallery tab for search, filter, preview, copy, download, and delete.

How do I configure a custom Base URL for the OpenAI Compatible mode?

Pick OpenAI Compatible as the provider in DSH settings, then enter a custom Base URL and API key; the model is also customizable. It works with any service compatible with the OpenAI Images API, including self-hosted backends.

How do I install and update dsh-image-gen as a DSH plugin for DeepSeek Harness?

To install dsh-image-gen as a DSH Plugin, run dsh plugin --profile web add dsh-image-gen@latest; re-run it to update and run dsh plugin remove dsh-image-gen to uninstall. A GitHub source install is also available.

Related Terms

dsh-image-gen
dsh-image-gen is an open-source DSH plugin maintained by shanliuling that adds native text-to-image, image-to-image, and multi-turn editing to DeepSeek Harness conversations, with a built-in gallery.— dsh-image-gen README
Provider
Provider is dsh-image-gen's term for an image backend — Gemini, OpenAI, Seedream, DashScope, or local ComfyUI — selected in settings with an API key or an imported workflow.— dsh-image-gen README
generate_image and edit_image
generate_image and edit_image are the two tools dsh-image-gen exposes to the agent: the former creates an image from a prompt, the latter edits an existing image.— dsh-image-gen README
ComfyUI
ComfyUI is the local image backend supported by dsh-image-gen; you import an API Format workflow and generate locally, using {{prompt}}, {{seed}}, and {{image}} placeholders.— dsh-image-gen README
Gallery
Gallery is dsh-image-gen's history panel in the conversation top bar for searching, filtering, previewing, copying, downloading, and deleting generated images.— dsh-image-gen README

Sources

View all articles