AI Agent Hub
Back to plugins
dsh-text2img-compress preview

dsh-text2img-compress

Model Inference Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install Nigel211/dsh-text2img-compress

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install Nigel211/dsh-text2img-compress in the DeepSeek Harness terminal to install (source: https://github.com/Nigel211/dsh-text2img-compress), then restart DSH to activate the plugin.

About this plugin

Feeding long text to a vision model often means tens of thousands of input tokens and a context window that fills up before you are done. dsh-text2img-compress takes a straightforward approach: before a message is sent, any text block exceeding a configurable threshold is automatically rendered into a series of 800x800 images, each consuming a fixed 384 tokens, so the model reads the full content from pictures.

For Chinese text, rendering at 18px typically yields a 2-2.5x token reduction, and smaller sizes such as 13px can push that to 4-6x. English text sees roughly 1-2x depending on font size. Critically, every word is preserved in the image, the conversation prefix remains byte-for-byte unchanged, and cache hits are not affected. If the page limit is exceeded or rendering fails, the plugin falls back to plain text-never losing content.

It is built for developers who need a vision model to digest long documents, papers, or changelogs, or who want to reclaim context-window budget for reasoning steps and tool results. If your workflow demands character-exact fidelity-code, SQL, JSON-keep those messages as plain text.

Screenshots

Use Cases

  • Reduce input tokens when a vision model reads long papers or manuals
  • Free up context-window budget for reasoning steps and tool outputs
  • Lower API costs for batch summarization or retrieval over long texts

Best For

  • Developers using DeepSeek vision models to process lengthy documents
  • Teams with Chinese-heavy workflows needing token cost reduction
  • Engineers focused on context-window efficiency and avoiding truncation