PlotFig: Scientific Illustration and Layer Editing for DeepSeek Harness

Introduction

When using DeepSeek Harness to call models for scientific illustration, a common challenge is that models are good at generating images but are not well suited to directly producing publication-quality vector graphics, layer-editable schematic diagrams, or scientific illustrations requiring precise control. The typical existing workflow involves having the model generate an image first, then manually retouching, layering, and exporting it in tools like Photoshop. This workflow is fragmented and time-consuming.

PlotFig is an AI illustration plugin designed for DeepSeek Harness. Built on the Seedream, GPT Image, and Nano Banana models from AI4Scholar, it enables scientific illustration generation, layer editing, and multi-format export within the DSH environment. It integrates image generation, reference editing, transparent background processing, and layer splitting into a single workflow, reducing reliance on external tools.

Plugin Positioning & Maintainer

PlotFig (dsh-plotfig) is a DeepSeek Harness plugin maintained by literaf, categorized under model inference. It leverages the illustration models provided by AI4Scholar to perform scientific illustration generation, image editing, and layer splitting within DSH, and supports export to PNG, SVG, PDF, and PSD with editable text.

Installation & Activation

Before installing, make sure DeepSeek Harness Desktop is already installed. The first time you open Desktop, it will initialize the user configuration. After installation is complete, you must fully quit the application.

The installation command is as follows:

dsh plugin --profile desktop add dsh-plotfig@0.6.0

After restarting Desktop, go to Plugins → Installed plugins and enable dsh-plotfig. Open the PlotFig panel from the sidebar.

In the top-right corner of the PlotFig panel, select Check for Updates to compare your locally installed version with the latest stable version on npm. If your installed version is below 0.6.0, you can select Update to v0.6.0 in the update dialog. For older versions (0.2.1 and below), you can select Update to v0.6.0 on the Featured Research Plugins card.

PlotFig uses an AI4Scholar API key for generation, editing, and layer splitting. If dsh-ai4scholar has already configured a key in the environment variable AI4SCHOLAR_API_KEY, the plugin will read it automatically. If no key is configured, you can select Get Key in the PlotFig settings, log in, copy the key from the Open Platform, paste it in, and save. The Test Connection option in settings lets you check balance and Seedream availability for free.

Canvas Types & Generation Workflow

PlotFig provides two canvas types:

  • Conversation Canvas: Each conversation corresponds to one canvas. Images generated within a conversation are placed on the canvas. When generation starts, the canvas opens in the right sidebar (requires Harness ≥ 0.2.2). Conversation canvases share DSH’s native editor; examples, references, and edits are appended to the same session draft without being submitted immediately.
  • Standalone Canvas: Created by clicking New Canvas in the PlotFig panel. It does not belong to any conversation.

In the DSH host (which supports right-sidebar canvases), you can send /plotfig in the chat input box to open the current conversation’s canvas. Then type descriptive instructions on the canvas, such as /plotfig Draw a rainforest layering cross-section, textbook style, to generate an image on the canvas. The legacy /seedream <description> command remains available.

In a standalone canvas, you can enter a description via the prompt box at the top of the panel, or have the assistant draw on the canvas. The size menu offers 7 aspect ratios at 2K resolution, along with 1K/1.5K/2K tiers, or let the model choose the aspect ratio automatically.

Generation & Editing Capabilities

Models & Styles

Select a model next to the send button. New canvases default to Seedream 5.5. The GPT Image and Nano Banana families offer more model and resolution options. The canvas remembers the current selection for new images and reference edits. When regenerating an existing image, the model originally used for that image is applied.

Style presets include six appearances: flat, soft 2.5D, line art, naturalistic illustration, 3D rendering, and ink with light washes. Selecting a preset does not trigger a model call; it only records the style rules for that canvas. If you use Follow Description or style: "auto", the prompt is kept unchanged. Presets do not guarantee scientific accuracy or compliance with journal requirements.

Regeneration & Batch Generation

After selecting an image on the canvas, click Regenerate to regenerate it in place using the original prompt, references, dimensions, and style. The old version is preserved and can be toggled to view via the toolbar. For batch needs involving multiple different images, the assistant calls seedream_generate_batch to generate 2–10 images at once, billed sequentially. Failed items are reported but not retried.

Reference Images & Transparent Background

Select an image and click Add as Reference to include it as a reference in the prompt; up to 10 references can be added. The system marks the primary edit/reference image as Figure 1 and labels the rest sequentially. You can use descriptions like “Place the device from Figure 2 into Figure 1” in your prompt.

Enable Transparent Background and describe the subject to generate a transparent PNG, suitable for icons, devices, and illustration components. If transparent background is not enabled, the result will retain an opaque background, and the system will issue a warning. Multiple edits default to an opaque background for consistency.

Import & Templates

Importing a PNG or JPEG on the canvas (max 30 MB, no side exceeding 16,000 px, total pixels not exceeding 32M) does not trigger a model call. The original PNG bytes and alpha channel are preserved.

The Templates feature provides six local templates covering model architectures, cyclic diagrams, and timelines, each with three color schemes. Templates can be used without an API key. Previously saved flowcharts can still be opened, edited, and exported from the gallery.

Layer Splitting & Export

Click Split Layers to decompose an image into multiple movable transparent layers, accompanied by editable OCR text. The layer service places transparent inputs on a white background for decomposition. The original image and the returned foreground alpha are preserved.

Export supports PNG, SVG, PDF, and PSD (with editable text) formats. Exported results can be used for paper typesetting, presentation creation, and further layer editing.

Image Editing (AI Processing)

All image editing operations save the result as a new canvas image; the original image remains unchanged. Operations are billed per output image. Failed items are marked for review and are not automatically retried.

  • Background Removal: Extracts a transparent cutout of the subject. Titles and panels are removed unless explicitly requested.
  • Inpainting (Erase): Uses a brush or rectangular mask, with support for undo and redo. Every RGBA byte outside the mask is restored from the original image. Edges are feathered inward by 0–64 px.
  • Partial Redraw: Select 1–16 regions and describe what to draw. Regions are sent as <bbox> tags, and pixels outside the mask are restored from the original image. The entire region is redrawn; any drawing that crosses a region boundary will be clipped upon restoration and flagged.
  • Outpainting (Extend): Extends one edge at a time, using the cropped edge as a reference with conservative alignment. The original rectangle is restored byte-for-byte. You can extend left, right, top, and bottom in sequence.

Use Cases & Considerations

PlotFig is suitable for researchers who need to quickly generate scientific illustrations, schematic diagrams, flowcharts, and figures for papers. It integrates image generation and layer editing into the DSH workflow, reducing dependence on external illustration software.

The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license information in the GitHub repository before installing. PlotFig changed its license to AGPL-3.0-only in version 0.6.0. The previous MIT license remains valid, but from this version onward, the AGPL-3.0-only terms apply, and you should be aware of AGPL’s copyleft requirements for derivative works. For commercial use, consult LICENSING.md and COMMERCIAL-LICENSE.md.

For Web hosts, it can be used via --profile web. Saved canvases can be opened, edited, and exported locally without an API key.

Conclusion

PlotFig connects AI4Scholar’s illustration models to DeepSeek Harness, enabling researchers to complete the full pipeline—from scientific illustration generation and reference editing to layer splitting and multi-format export—within a single environment. For scenarios requiring a large volume of schematics, flowcharts, and illustration components, it provides a relatively complete automated solution. Links to the plugin directory page and GitHub repository are provided below.

  • Directory: https://www.skillhub.cn/plugins/literaf/dsh-plotfig
  • GitHub: https://github.com/literaf/dsh-plotfig
羽毛球分组比赛记分
小程序二维码

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

Xiaoye