DSH Tencent Hunyuan Image Generation Plugin: Hy-Image Integration, Local Image Library, and In-Chat Generation

Introduction

When building agents or having daily conversations in DSH (DeepSeek Harness), if you need to call Tencent Hunyuan Hy-Image for image generation, the common approach is to assemble the TokenHub API yourself, handle size constraints, and create separate scripts to save results—remote URLs expire after about 12 hours, and the image library can easily become disconnected from the conversation context. dsh-plugin-hunyuan-image is a native plugin for DSH: it provides a generation panel and local image library in the client, and registers a tool that can be called by models, integrating Hunyuan v3.5-preview and v3.0 into the same workflow. Below we introduce its positioning, capabilities, and installation configuration.

What Is This

The plugin depends on Node ≥ 20, has no native binary dependencies, and runs on macOS, Windows, and Linux. Documentation is available in English and 7 other languages (including Simplified Chinese). The DSH community plugin directory is an independent site with no official affiliation with DeepSeek / 幻方; before installation, it is recommended to review the source code and license yourself, as the plugin runs with the permissions of the current DSH process.

Core Features

Dual Models

Model ID Capability Summary
hy-image-v3.5-preview Chat/Messages protocol; multimodal input, multi-turn editing, chain-of-thought prompt revision; output up to 4K (4096×4096)
hy-image-v3 Classic text-to-image; prompt revision; 37 official preset sizes

Official Two-Step Size Selection

The interaction matches the Tencent TokenHub console: resolution tier × aspect ratio. The plugin converts the selection into the required WxH string for the API and validates official constraints (v3.5: side length [256, 8192], area ≤ 16,777,216; v3.0: side length [512, 2048], area ≤ 1,048,576). The interface displays the exact pixel dimensions that will be submitted.

v3.5 supports 1K / 1.5K / 2K / 4K and multiple aspect ratios, plus Auto (no size passed, determined by the model). v3.0 supports 720P / 1K combinations, or Auto to choose from 37 presets.

Batch Generation

A single request can generate 1 / 2 / 4 images in parallel; results are displayed one by one with indices like 1/4. Partial failures are reported individually.

Local Image Library

  • Successfully generated images are automatically saved to disk (pure JS JSON storage, no SQLite, no native modules)
  • Thumbnail grid and list views
  • Keyword search (matching original prompt and revised prompt), filterable by model and time range
  • Details drawer showing full prompt, model, dimensions, timestamp, and local path
  • Regenerate: One-click refill of the original prompt and parameters
  • Multi-select batch delete (also deletes local files), copy prompt, copy image

Tencent remote URLs expire after approximately 12 hours; the plugin downloads images locally immediately after generation to prevent library links from becoming invalid.

Output Directory

Default is ~/Pictures/DSH-Hunyuan-Image; can be changed to any path via the system folder selector in settings (recommended to use a non-system drive). Changes take effect immediately without restarting the plugin. Files are stored by month in <folder>/<YYYY-MM>/.

Reference Images

Supports upload from disk (converted to data URL) or public URL. v3.5 supports up to 20 images (each ≤ 20 MB); v3.0 supports up to 3 images (each ≤ 10 MB).

Official Advanced Parameters (Session-Level)

Parameter Applicable Model Description
seed Both Reproduce results
footnote Both Watermark footnote, ≤ 16 characters, bottom right
use_search_tool v3.5 Web search enhancement before image generation
resize_max_pixels v3.5 Limit token cost of large reference images
revise v3.0 Auto-revise prompt (adds ~11 s, recommended on by default)

Model-Callable Tool

The plugin registers the tool hunyuan_generate_image. In conversations, you can directly describe your needs (e.g., “draw a cat”), and the model can actively call this tool to generate images.

Installation and Activation

The official recommendation is to install the prebuilt package from Release, no local compilation needed.

  1. Download dsh-plugin-hunyuan-image-1.0.0.tgz from Releases.
  2. Extract to a fixed directory, e.g., ~/dsh-plugins/:
mkdir -p ~/dsh-plugins
tar -xzf dsh-plugin-hunyuan-image-1.0.0.tgz -C ~/dsh-plugins
  1. In a DSH conversation, ask the assistant to perform the plugin installation (using install_bundle from plugin_manager):

Please install ~/dsh-plugins/package as a DSH plugin (use plugin_manager with install_bundle).

  1. Restart DSH.

For more complete reinstallation / new machine steps, see INSTALL.md in the repository (includes Simplified Chinese INSTALL.zh-CN.md). Developers can also build themselves with Node ≥ 20 and pnpm by running pnpm build and linking to a profile; see README for details.

Configuration

Getting API Key

  1. Log in to Tencent Cloud.
  2. Activate TokenHub.
  3. Create a Key on the API Key page (formatted like sk-...).
  4. Activate post-paid billing for hy-image-v3.5-preview and hy-image-v3 at Online Inference → Vision Models.

Plugin Settings

Open the 🖼 Hunyuan Image panel below the input box → Settings:

Field Description Default
API Key Key created in the previous step —
Output folder Local save path ~/Pictures/DSH-Hunyuan-Image
Default model hy-image-v3.5-preview or hy-image-v3 v3.5-preview
Default resolution See size tiers above 1K
Default aspect ratio See aspect ratios above 1:1
Watermark footnote Watermark footnote Empty

Click Save, then use 🔌 Test connection to verify the Key. Note: Images are actually saved in monthly subfolders under the selected directory, not directly in the root directory.

Typical Usage

Panel Image Generation

  1. Click Hunyuan Image to open the generation panel.
  2. Enter a prompt, select model, resolution tier, and aspect ratio, set batch (1/2/4) and advanced parameters as needed.
  3. After generation, view, search, or “regenerate” in the image library.

In-Conversation Image Generation

Describe the image in natural language in a DSH conversation; if the assistant has tool permissions, it can call hunyuan_generate_image to complete image generation, and results will also be written to the local library and output directory.

Use Cases and Notes

Suitable for: Users who are already developing conversations or agents on DSH desktop, need Hunyuan Hy-Image, want size selection consistent with TokenHub, and require local persistence and library search.

Notes:

  • Calling TokenHub incurs cloud-side costs; you need to activate post-paid billing and securely store the API Key yourself.
  • Unimplemented capabilities are subject to the “Known limitations & roadmap” in the README; this article only describes behaviors already implemented in version 1.0.0.
  • The plugin runs in the same process as DSH; before installing a bundle, please verify the source of the release package and the repository LICENSE.

Conclusion

dsh-plugin-hunyuan-image integrates Tencent Hunyuan Hy-Image-3.5-preview and Hy-Image-3.0 as a native DSH plugin: official size interaction, batch image generation, local image library, and the hunyuan_generate_image tool, with zero native dependencies running cross-platform. For more information, visit the SkillHub directory page and GitHub repository (includes README in 8 languages).

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye