dsh-pixelfly: Building an Image Studio with a Version Tree in DeepSeek Harness

Introduction

When building agents or conversational apps in DeepSeek Harness (DSH), generating and iterating on images often requires separately connecting to upstream APIs, managing retries and multiple Keys, and preserving history for “version after version.” Common approaches are scripts or scattered HTTP calls, where projects and intermediate results are scattered, making it difficult to compare and revert within a single workflow.

dsh-pixelfly (PixelFly) is a studio plugin for DSH: configure upstreams and Keys in the Harness UI, generate images using prompts on the Studio page and continue with edits like regional repaint, background removal, and outpainting; every step becomes a node on the version tree. Maintainer is Qinqing1999, categorized in the community directory as Model Inference; current plugin version is 0.2.0 (MIT), requires DSH >=0.2.1-rc.2.

What is it

PixelFly consolidates “Text to image + multi-type image editing + single workspace history” into one DSH plugin. It does not manage multiple independent project libraries in the traditional sense: each run becomes a version in a tree, with the parent node being the image you were editing at that time, making it easy to trace the evolution process and reopen at any node.

Configuration is entirely done within the Harness interface, requiring no environment variables or manual configuration files. Both the Settings page and the Studio page offer Chinese and English interfaces, switchable in the top-right corner of the page.

Core Features

Single Workspace and Version Tree

Maintains a single history within the same workspace. You can start from a blank prompt or use Upload a picture to upload an existing file as the root version, with subsequent operations continuing from that node. If a single run returns multiple candidate images, they remain under the same version, displayed as thumbnails at the bottom of the canvas for selection and as the starting point for the next edit.

The operation list is driven by configuration: if the original image or vision model required for a certain operation is not configured, the interface will not provide that operation.

Operation Required Input Effect
Text to image prompt Draw new image
Prompt edit prompt Redraw the whole image per instructions
Regional repaint Selection + prompt Redraw only the dragged area
Remove element Box + preset Erase clutter, pedestrians, text, etc., optional protection box
Extract asset Box + type Cut object out to a white-background directory-style background
Remove background — Cut subject to transparent
Outpaint New size Expand canvas and draw new area
Enhance Intensity Three levels of sharpening details and lighting
Remove watermark Box (optional) Visual model locates or manually drawn box to remove watermark
Edit text Area Identify text in image and replace or clear
Colour and line art Mode Change color or convert to/from line art
Reference fusion Reference image + prompt Fuse reference subject, pose, clothing, etc.
Batch Prompt list or variables Generate multiple versions via batch or [variable] combination
Prompt distillation Image Infer prompt from image and record as a step
Upload a picture File Use existing image as root of history

Selections are completed by dragging on the image and saved as percentages, maintaining semantics when the upstream returns resolution changes.

Seams Handling for Regional Editing

When editing only a small box on a full-frame image, the model tends to draw the inside of the box as an independent small image, creating a “patched block” feel. PixelFly sends a padded crop to the upstream: real pixels are preserved around the changed area, and the model continues drawing based on visible context; upon receiving the answer, only the part aligned with the selection is pasted back, colors are corrected along the edges, and a smoothstep feathering blends it into the original image.

Upstream, Multi-Key, and Retry

  • Key Ring: Requests rotate through keys; Keys encountering 401/402/403 enter a cooldown, switching keys on the next attempt to avoid a single key failure interrupting the entire run.
  • Exponential Backoff + Jitter: Retry on 429/5xx and network errors, with a configurable limit; follows Retry-After if sent by the upstream.
  • Keys are stored in 0600 files within the Harness data directory; the interface only displays a mask (e.g., sk-a1b2…z9y8); the README states that Keys are not written to logs.

Model Roles

Both types of models are configured on the Settings page:

  • Image model: Responsible for drawing; optimized and tested for SenseNova image models sensenova-u1.5-fast and sensenova-u1.5-lite, but can also connect to any OpenAI-compatible image endpoint.
  • Vision model: Used for planning repaints, finding watermarks, naming cut-out subjects, reading text in images, etc.; defaults to the SenseNova conversational model.

The upstream protocol can be selected as SenseNova, OpenAI-compatible, Gemini, or Grok in the settings; the vision model has a separate protocol selection (Chat Completions, Anthropic Messages, or Responses API) because image endpoints and conversational endpoints from the same vendor may not have consistent formats. The model list is driven by configured items rather than solely relying on the upstream directory, preventing usable models from being missed due to directory omissions.

Agent Tools

The model in the conversation can call the following tools to drive the studio:

Tool Purpose
pixelfly_generate Generate image based on prompt
pixelfly_edit Execute editing operations on the current image or specified version
pixelfly_history List, view, star, delete, or clear versions; set workspace styles
pixelfly_config Read/write upstream, Keys, retry policy, and defaults
pixelfly_status Status of Keys, versions, dimensions, and operation directory

Installation and Activation

Execute under the profile where you want to enable the plugin (replace the path with your local plugin directory):

# from the profile you want the plugin in
dsh plugin --profile web add file:/path/to/dsh-pixelfly

After completion, open Settings → PixelFly, fill in the upstream base URL, paste at least one API Key, and click Test next to the Key to verify availability.

The DSH ecosystem extends on the principle of “everything is a plugin”; the community directory is on a separate site and has no official affiliation with DeepSeek / Huafan; installation source refers to the directory page and the repository.

Typical Usage

  1. Install the plugin and configure upstreams and Image/Vision models on the PixelFly settings page.
  2. Go to Studio: input a prompt to use Text to image, or upload a picture as the root version.
  3. After selecting a node on the version tree, choose operations like Regional repaint, Remove background, Outpaint as needed; when there are multiple candidates, switch between thumbnails to display and edit the starting point.
  4. If orchestrated via an agent, rely on tools like pixelfly_generate, pixelfly_edit in the conversation and use pixelfly_history to manage versions.

Data falls under the Harness data directory; deleting that directory resets the workspace (does not affect other paths on the machine):

$DSH_HOME/plugins-data/pixelfly/
  config.json     upstream, keys (0600), retry policy, defaults
  history/        the workspace: its version tree and settings
  assets/         every picture, content-addressed by SHA-256
  library.json    saved prompts

Use Cases and Notes

Suitable for developers who want to complete image generation, iterative editing, and version comparison within DSH’s same Web UI and Agent toolchain; when needing to interface with SenseNova or OpenAI-compatible image/vision upstreams, the protocol and model selection on the settings page can directly align with existing endpoints.

The plugin runs with the current DSH process permissions, reading and writing to $DSH_HOME/plugins-data/pixelfly/ and storing Keys and image resources locally. Before installation, you should review the GitHub repository source code and MIT license yourself to confirm that the upstream Key and data retention policy meet your environment requirements. Dependencies include sharp ^0.35.5, which requires the runtime environment to meet the plugin’s packaging requirements.

Conclusion

dsh-pixelfly brings image generation, editing pipeline, multi-key rotation, and version history into the form of a DSH plugin: configure upstreams on the interface, a tree in Studio manages all results, and on the Agent side there are five pixelfly_* tools available for orchestration.

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

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

Xiaoye