Preface¶
The design philosophy of DeepSeek Harness (DSH) is “Everything is a plugin.” During the development of agents or debugging, it is sometimes necessary to generate visual content directly. Existing solutions often require additional configuration or standalone UIs, which are disjointed from the development environment.
Here we introduce muze63096/dsh-draw-plugin. This is a plugin that runs within the DSH client, adding a full-page panel to the sidebar. You simply need to input a prompt to generate images locally or via cloud services.
Plugin Overview¶
This is an open-source plugin maintained by muze63096, currently listed in the ecosystem directory. Its core value lies in integrating text-to-image capabilities directly into the DSH sidebar, providing a “write-and-draw” experience.
- Name: muze63096/dsh-draw-plugin
- License: MIT
- Core Capabilities: Full-page sidebar panel, instant image generation via prompts, two art style presets (Q-style/Normal), three image generation engines, zero runtime dependencies, one-click installation for local engines, LoRA support, automatic Chinese-to-English prompt translation, automatic retry on rate limits, realistic format saving to disk, history thumbnails, and custom save locations.
Installation and Activation¶
The plugin is installed into the DSH profile via npm.
# Install from npm
dsh plugin --profile web add dsh-draw-plugin
# Install from local directory (must add -w)
dsh plugin --profile web add -w "D:\path\to\dsh-draw-plugin"
Note: The
-wparameter is mandatory. The DSH profile directory is itself a pnpm workspace root, and omitting this parameter will result in an error. After installation, you must restart the DSH web app because the client bundle is assembled at startup.
Core Features¶
After installation, a “Draw” panel with a pencil icon will appear at the bottom of the sidebar.
- Multi-Engine Support: Supports three image generation engines; API Keys are filled in by the user.
- Free Engine: Pollinations, ready to use out of the box, no Key configuration required.
- SiliconFlow: Provides models like Kolors; requires creating a Key in the SiliconFlow console.
- Custom Interface: Connects to any OpenAI-compatible
/images/generationsendpoint. - Local Engine: Directly calls a locally deployed Stable Diffusion inference backend.
- Art Styles and Prompts:
- Offers “Q-style” and “Normal” art style presets. Style keywords are placed at the beginning of the prompt by default to enhance effects.
- Supports automatic Chinese-to-English prompt translation; this is to accommodate local base models (local base models are typically trained on Danbooru English tags and cannot understand pure Chinese).
- Localization and LoRA:
- The local engine supports one-click installation. The plugin does not manage ComfyUI; you need to start the inference backend on your machine first.
- Supports LoRA. In ComfyUI mode, you can select it via a dropdown in the panel; in Lightweight SD.cpp mode, you must write
<lora:name:0.8>in the prompt.
- Stability and Saving:
- Rate limiting (402/429) from the free engine triggers an automatic retry mechanism.
- Supports saving to disk with realistic formats, where file extensions match the Content-Type.
- Supports custom save locations; once entered, the setting is remembered.
Typical Usage¶
- Basic Usage: Click the pencil icon in the sidebar to enter the panel.
- Free Generation: The free engine is used by default; simply input a Chinese prompt and click generate.
- Switching Engines: Switch to “SiliconFlow” or “Custom Interface” and fill in the corresponding API Key. Keys can also be stored in the workspace’s
.dsh-draw-key.txtfile. - Fixed Character: Write a description in the “Fixed Character” input box; this description will be automatically included in every image, suitable for repeatedly generating the same character.
- Using Presets: Use the preset buttons above the prompt box to fill in art style, size, and negative prompts in one click.
Local Engine and Local Deployment¶
The local engine supports two modes, differing significantly in disk usage and installation difficulty.
1. Lightweight Version (SD.cpp)¶
- Size: ~29 MB engine + 2 GB models (Total ~2.5 GB).
- Speed: RTX 4050 / 512×512 / 20 steps, ~9.5 seconds.
- Requirements: Windows + Vulkan-supported GPU (N-cards, A-cards, or integrated graphics are all acceptable).
- Interface: Built-in OpenAI-compatible and A1111-compatible interfaces; no extra code needed for plugin integration.
2. Full Version (ComfyUI)¶
- Size: ~5 GB (including CUDA PyTorch) + 2 GB models (Total ~12 GB).
- Speed: RTX 4050 / 512×512 / 20 steps, ~10 seconds.
- Requirements: Windows + NVIDIA GPU (CUDA).
- Ecosystem: Complete ComfyUI ecosystem, supporting custom nodes and workflows.
When installing the local engine, the panel provides a “One-click Install” button. For ComfyUI, it automatically downloads embedded Python, ComfyUI source code, CUDA PyTorch, and default base models (all via sources accessible within China). The default installation location is $DSH_HOME/comfyui.
Save Location and Configuration¶
The default save directory is $DSH_HOME/dsh-draw. The “Save to” input box on the panel supports custom paths:
* Empty: Use the default directory.
* Relative Path (e.g., my-pics): Resolved relative to $DSH_HOME.
* Absolute Path (e.g., D:\pics\draw): Used directly.
* Home Directory (e.g., ~/pics): Resolved to the pics directory under the user’s home directory.
Configuration is saved in $DSH_HOME/dsh-draw.config.json. Generated image file names follow the format img-<seed>-<ts>.jpg (the extension varies based on the actual format).
Use Cases and Notes¶
- Use Cases: DSH developers who need to quickly generate visual feedback, debug multimodal agents, or reuse the art style of specific characters.
- Notes: Local base models are usually trained on Danbooru English tags; it is strongly recommended to enable automatic Chinese-to-English translation. If using the lightweight SD.cpp version, LoRA must be manually written in tag format. Keys are created on SiliconFlow and are not interchangeable with DeepSeek API Keys.
Plugin Directory: muze63096/dsh-draw-plugin