DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Image Webp To Png — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
I

dsh-image-webp-to-png

Image Webp To Png

将 WebP 附件 request-images 重新编码为 PNG,供无法解码 WebP 的 LLM 后端(例如 llama.cpp)使用。修复带 alpha 通道图像的“400: Failed to load image or audio file”错误。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:MrGnUm/dsh-image-webp-to-png#e2991964767b388bac5464c8bdd1c97fdefc87a0
README兼容性版本

兼容性与来源证明

Image Webp To Png 以 dsh-image-webp-to-png 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/10/6

版本

0.1.0stable
2026/10/6

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/6
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 vision-media 分类下经过校验的插件。

Modlens@liustack/modlens面向仅支持文本的 LLM 的插件视觉能力,由免费的 Antigravity CLI 提供支持Tool Describe Image@linxin666/dsh-tool-describe-image面向模型的 describe_image 工具,用于 dsh Web GUI:通过在兼容 OpenAI 的端点调用视觉语言模型,为文本模型提供图像理解能力,以描述一张图像(本地路径、http(s) URL 或附件引用)。可热插拔 —Vision Routerdsh-vision-router为仅支持文本的 DeepSeek Harness agents 提供视觉能力:内置免费视觉链路和像素级工具。除非配置为严格仅限本地使用,否则远程视觉提供商(包括默认的免费回退服务)会接收图像内容。Vision Toolkit@anionex/dsh-vision-toolkit面向 Harness 原生集成的 DeepSeek 与 agent-vision-toolkit:图像问答、OCR、定位、UI 还原、像素差异、Artifacts 和 Web UI。

README

dsh-image-webp-to-png

A DeepSeek Harness (DSH) bundle that fixes the 400: Failed to load image or audio file error you get when sending alpha-channel images to a backend that cannot decode WebP — most notably llama.cpp (its vision decoder is stb_image, which has no WebP support).

It is an installable plugin: it lives in your profile, is re-applied on every DSH start, and survives DSH updates without touching the root-owned /usr/lib/node_modules/@deepseek-ai/dsh/node_modules/@deepseek-ai/dsh-attachment-local file.


Why images fail

DSH normalizes every attached image in dsh-attachment-local. The codec choice is hard-coded (encodingLadder):

const mediaType = hasAlpha ? "image/webp" : "image/jpeg";

So any image with an alpha channel is re-encoded to WebP. (A clean 8-bit sRGB image with no metadata that fits the size/limit budget passes through as-is; opaque images become JPEG.)

  • Opaque → JPEG → llama.cpp decodes it fine.
  • Alpha → WebP → llama.cpp's stb_image cannot decode WebP → the request is rejected with 400 {"code":400,"message":"Failed to load image or audio file"} and the server logs E mtmd_helper_bitmap_init_from_buf: failed to decode webp buffer.

There is no configuration knob in dsh-attachment-local to change this codec, and the server side (llama.cpp) is not going to add a WebP decoder, so the fix belongs on the client.

How the bundle fixes it

The adapter (e.g. dsh-llm-pi-ai, used by your fedotov provider) builds the outgoing request by calling the attachment seam:

attachments.readImageRequest(ref, target, signal)  // -> { data, mediaType, width, height, ... }

This bundle wraps that one seam method at DSH start (idempotently, guarded by a Symbol). Whenever the underlying store returns a WebP request-image, the wrapper transparently re-encodes those bytes to PNG:

  • PNG preserves the alpha channel (JPEG would flatten it).
  • PNG is decodable by every backend (llama.cpp, OpenAI-compatible, …).
  • Dimensions are unchanged (pure format conversion, no resize).
  • The result is cached by variantId, so a given image is re-encoded once.

Everything else passes through untouched (JPEG stays JPEG, PNG stays PNG).

The wrapper is fail-open: if sharp is missing, a decode fails, or the seam is not ready at load time, the original WebP result is returned unchanged and DSH keeps working exactly as before. This bundle can never block or fail a request.

Files

dsh-image-webp-to-png/
├── package.json        # bundle manifest (dsh.bundle.patch)
├── cordis.patch.yml    # self-declares the entry (id: image-webp-to-png)
├── lib/index.mjs       # the bundle: wrap(attachments) + webpToPng()
├── install.sh          # install into a profile (default: web)
└── uninstall.sh        # remove from a profile

Install

Requirements: pnpm on PATH, and a DSH profile (default ~/.dsh/profiles/web).

cd dsh-image-webp-to-png
./install.sh                      # -> ~/.dsh/profiles/web
# or a different profile:
DSH_PROFILE_DIR=/path/to/profile ./install.sh

install.sh (idempotent, backs up package.json first):

  1. Adds dsh-image-webp-to-png as a link: dependency pointing at this directory.
  2. Adds it to the profile's dsh.profile.bundles array.
  3. Runs pnpm install in the profile to create the symlink + update the lockfile.

The fix takes effect on the next DSH web session (immediately if the profile has patchReload: "live").

Install from GitHub

Repo: MrGnUm/dsh-image-webp-to-png (private). From any machine with pnpm, git, and access to the repo — HTTPS clone works with the gh credential helper (no token prompt):

git clone https://github.com/MrGnUm/dsh-image-webp-to-png.git
cd dsh-image-webp-to-png
./install.sh            # -> ~/.dsh/profiles/web

Then restart the DSH web session (or it hot-reloads if the profile has patchReload: "live"). Remove later with ./uninstall.sh.

Verify

Send an alpha-channel image (a PNG with transparency) to your fedotov model and ask it to describe it. Before the bundle: 400 … Failed to load image or audio file. After: the model describes the image.

You can also watch the DSH logs for the one-time line: dsh-image-webp-to-png: wrapped attachments.readImageRequest (WebP -> PNG).

Revert

./uninstall.sh                                  # clean removal
# or, using the backup install.sh made:
./uninstall.sh ~/.dsh/profiles/web/package.json.bak-<timestamp>

For the admin (server side, optional)

The client-side fix above is sufficient. If you would rather fix it at the source, the root cause is the hard-coded hasAlpha ? "image/webp" : "image/jpeg" in dsh-attachment-local/lib/index.js (encodingLadder, and the matching pipeline.webp(...) branch in encode()). Upstream has no option to emit PNG for alpha images; a small patch adding a PNG branch (and bumping the request-image-v6 transform version so stale WebP cache entries are regenerated) would remove the need for this bundle.

Compatibility notes

  • Works with any DSH profile that mounts the local attachment store (LocalAttachmentStore). If a future DSH changes the seam method name (readImageRequest) or its return shape, the wrapper degrades to a no-op (fail-open) and the original behaviour resumes.
  • sharp is resolved from the DSH installation (/usr/lib/node_modules/@deepseek-ai/dsh/node_modules/sharp); this bundle has no runtime dependencies of its own.