Preface¶
When sending screenshots, scans, or long comic strips to models in DeepSeek Harness (DSH), a common problem is: the image is large, but the model cannot read the small text. Images in a single request are limited to roughly 1024 vision tokens; the Harness downscales oversized images wholesale before feeding them into the model. For example, with an 8000×8000 screenshot, the model often only sees a thumbnail about 1300px wide, and the text is already blurry.
The community plugin dsh-image-tiler (maintainer Ssrs-Pro-Max, npm package name dsh-image-tiler, current version 0.1.6, MIT license) slices “a single oversized image” into multiple adjacent tiles during the attachment admission stage, and submits them as multiple image parts within the same message. Each tile is transmitted at its own resolution, so the model sees the effective resolution at upload time rather than the upper limit a single image can carry. Small images are not modified: for images the provider would transmit as-is anyway, behavior is identical to when the plugin is not installed.
The sections below introduce the plugin’s positioning, capabilities, installation and configuration, and usage caveats. Facts are based on the GitHub repository README and package declarations; this plugin is not an official DeepSeek product.
What Is This¶
dsh-image-tiler is a Cordis plugin for DSH, categorized as a model-inference-related capability: it replaces the admission step of attachment storage, and when a prompt carries a large image that “would lose readability after being downscaled by the Harness itself,” it uses sharp to crop and tile it in-process, then stores it under the existing attachment-local storage and limit rules.
Compatibility range (engines.dsh aligned with peer dependencies):
- DeepSeek Harness
>=0.2.0-rc.1 <0.3.0(the README states verification on0.2.0-rc.2) - Node.js 20 and above
Status is experimental: the tiling strategy has real-test notes in the README, but the plugin replaces the core attachment service, so after a major Harness version upgrade, re-validation is recommended.
Core Functionality¶
Tiling Large Images for the Model¶
When a single image is too large to pass the provider’s vision budget without severe downscaling, the plugin plans a tile layout, uses sharp to crop the source image, and returns each tile as an independent image part. The tiling result is written into the session message itself, so replay, resume, and fork reconstruct the same set of images the model saw at that time.
The README provides a comparison on DSH 0.2.0-rc.2, desktop host, an 8000×8000 PNG containing small text (default settings):
| As a single image | Tiled (default) | |
|---|---|---|
| Received by the model | 2048×2048, re-encoded | 20 tiles, each up to 2000×1600 |
| Glyph height in the source image | 10 px, unreadable after scaling | 10 px, unchanged |
| Text lines the model can distinguish | 0 | 8 |
The small-image path is unchanged: for images the provider would transmit as-is anyway, only 1 tile is produced, same as without the plugin.
Layout and Fallback¶
The layout logic is in lib/geometry.js; it picks a grid based on the provider’s image projection (patch/downsample grid, 1024-token budget), so each region stays as close as possible to the 1:1 relationship the provider would send “if only one image were sent.” If it cannot fit within the store’s limits (tile count, per-tile size, total volume), or would produce overly narrow strips, it falls back to sending the original image.
Security and Dependency Surface¶
The README states: no telemetry, no network, no credentials, no background services; no prepare / install / postinstall scripts; no subprocess spawning; sharp decodes/re-encodes in-process via native binding; tiles are written by the Harness’s built-in attachment store, in the same location as the original image. The plugin only reads files the store hands it. sharp is a bundled dependency; pnpm installs the corresponding platform-specific binary package.
Installation and Enabling¶
Install from npm (Recommended)¶
The plugin version is recommended to be pinned; the Harness version does not need to be pinned separately for the plugin: the package accepts any 0.2.x (including prerelease). If incompatible with the current Harness, installation is rejected before pnpm runs, with the message dsh: installation rejected: Plugin <name>@<version> is incompatible with dsh <version>; when testing unreleased Harness versions, you can use dsh plugin allow-version to manually override.
dsh plugin --profile web add dsh-image-tiler@0.1.6
Manual Addition for the Desktop Profile¶
Add the dependency and bundle to ~/.dsh/profiles/desktop/package.json, then restart the app from the tray after installation:
{
"dependencies": { "dsh-image-tiler": "0.1.6" },
"dsh": { "profile": { "bundles": ["...", "dsh-image-tiler"] } }
}
Verifying Installation¶
Send any image larger than about 1500×1500 and check the host logs; you should see something like:
image-tiler: 8000x8000 shown as 20 tiles of up to 2000x1600 (20.4x detail, 54% covered)
The change is: the number of image attachments corresponding to a single upload in the message goes from 1 to N.
Update and Uninstall¶
dsh plugin --profile web add dsh-image-tiler@0.1.6
dsh plugin --profile web remove dsh-image-tiler
Configuration¶
The plugin has no standalone settings. It acts as the attachment store and only reads fields that already exist on the official attachment-local row. A typical Cordis snippet (you need to disable the original attachment-local and have the plugin take over the attachments service):
- id: attachment-local
disabled: true # replaced by the plugin for the attachments service
- insert:
- id: image-tiler
name: dsh-image-tiler
All original attachment-local keys still apply, e.g. dshHome, maxImageBytes, maxImagesPerMessage, maxMessageImageBytes, maxImagePixels, maxImageDimension, normalizedImageMaxPixels, normalizedImageMaxDimension, normalizedImageMaxBytes, imageCompressionConcurrency.
Three items directly related to tiling behavior (defaults from the README):
| Key | Default | Effect on tiling |
|---|---|---|
maxImagesPerMessage |
20 |
Per-message tile budget, shared evenly among multiple images in the same message. A single 8000×8000 can fill all 20 tiles; with three uploads in the same message, each gets about 6 tiles. Lowering this value makes each tile larger; if it exceeds normalizedImageMaxPixels, it will be re-downscaled after cropping, degrading readability. |
normalizedImageMaxPixels |
4194304 |
Per-tile published pixel cap; the planner ensures each tile is below this, avoiding “crop then shrink.” |
maxImageBytes |
20971520 |
Per-tile storage size cap; any tile exceeding this causes the entire message to be rejected; the plugin measures each tile and, if necessary, sends the whole image instead. |
If the profile has already raised global image limits for large-image uploads, keep these values reachable; source images rejected by the store will not enter the tiler.
Typical Usage¶
- Install via the command above and ensure the
image-tilerbundle and the disabledattachment-localrelationship in the profile are correct. - Upload high-resolution screenshots, photographed documents, or long images in conversations (most noticeable when edge length is clearly greater than about 1500px).
- Observe the
image-tiler:lines in the logs to confirm tile count and sizes; ask the model about small text or table content in the image, and compare readability with and without the plugin.
No extra CLI or API is needed: tiling happens before user message admission, transparent to upper-layer prompt usage.
Use Cases and Caveats¶
Suitable for: when you need the vision model to read small text, UI details, or scans in large images within DSH sessions; willing to accept an increase in image parts within a single message (bounded by maxImagesPerMessage).
Caveats:
- The plugin runs with the current DSH process permissions and decodes/re-encodes user-uploaded images; review the source code and the MIT license yourself before installing.
- Experimental nature: it replaces the core attachment path; before upgrading Harness from
0.2.xto0.3.0, confirm whetherengines.dshand the peer ranges still match. - Tiling increases token and attachment counts and may hit message-level total image size limits; when tuning, also check fields like
maxMessageImageBytes. - The community directory page skillhub.cn and GitHub are independent information sources, with no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
dsh-image-tiler solves the problem of “large images being downscaled as a whole, losing small text” under DSH’s default vision budget: before admission, it plans tiles geometrically, letting small images follow the original path and large images enter the model as multiple tiles at readable resolutions. When installing, pin the plugin version 0.1.6, and keep Harness on 0.2.x.
- Directory page: https://www.skillhub.cn/plugins/Ssrs-Pro-Max/dsh-image-tiler
- GitHub: https://github.com/Ssrs-Pro-Max/dsh-image-tiler