dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Image + prompt → pure, layered SVG.
A local-first vectorization studio for DeepSeek Harness.
Built and maintained by xiangwriter.
dsh-xiangwriter-svg-studio
简体中文 · Install · Usage · Engine · Development · License
Personal, non-commercial use only. This repository is source-available, not open-source. Commercial use of any kind requires a separate written licence from xiangwriter; see COMMERCIAL.md. The
xiangwritername, mark and branding must remain intact.
SVG Studio turns a character illustration, sticker or flat-colour image into a real SVG made of paths, gradients and masks — no embedded bitmap, no external tracing service. It ships as three things in one DeepSeek Harness plugin:
svg_studio, for file-path workflows,svg-vector-recreation.Everything runs locally. Images and prompts go only to the local Harness server and the local Python engine.
Most image-to-SVG tools either return one giant traced path, or quietly embed the source PNG inside an SVG. SVG Studio is built for character art: it keeps the figure, refines the face locally, builds a clean backdrop, and validates that the result is genuinely vector.
The original illustration is never included in this repository; the plugin contains code and synthetic test fixtures only.
gradient backdrop is a clean gradient derived from the source border. It does not add a synthetic halo or dark ring. Choose original to keep the source background.<image> or data:image payloads. A structural check rejects malformed SVG.Requires a DeepSeek Harness profile with the Web UI and a Python 3.10+ interpreter with Pillow and numpy.
Install the plugin from GitHub:
dsh plugin add github:xiangwriter-dev/dsh-xiangwriter-svg-studio
Or from a local checkout:
dsh plugin add /absolute/path/to/dsh-xiangwriter-svg-studio
Install the Python engine dependencies into the interpreter DSH can see:
python -m pip install -r engine/requirements.txt
On Windows, DSH also detects its bundled Python runtime and DSH_SVG_STUDIO_PYTHON if set. The Studio page shows Local engine ready when Pillow and numpy are available.
Refresh the Harness Web UI. The sidebar entry SVG Studio / SVG 矢量化 opens the Studio.
The plugin is a bundle with a Host half (index.js), a Web client (client.js), a Cordis patch, locale metadata and the Python engine.
Ask in natural language; the skill is selected automatically when the task matches it:
Use svg_studio on D:\art\character.png. Preset: faithful. Keep face detail on,
outer contour off, clean gradient background. Save the SVG next to the source.
Or call the tool directly. Common arguments:
| Argument | Values | Notes |
|---|---|---|
image_path | local path | PNG / JPEG / WebP / GIF |
prompt | free text | Stored in the SVG description; guides settings |
preset | faithful, clean, flat, original, mini | Defaults to faithful |
colors | 24–224 | Overrides the preset palette size |
face_detail | boolean | Local face pass |
outline | boolean | Extra outer rim, off by default |
background | auto, gradient, original | Clean gradient, auto, or source backdrop |
saturation, contrast | numbers | Small colour adjustments |
output_path | local path | Optional destination for the .svg |
| Preset | Palette | Face pass | Backdrop | Best for |
|---|---|---|---|---|
faithful | 160 | on | clean gradient | closest overall recreation |
clean | 112 | on | clean gradient | smaller, flatter, tidier files |
flat | 72 | off | clean gradient | poster-like colour masses |
original | 140 | on | source backdrop | scenes, photos, or when the backdrop is part of the art |
mini | 64 | off | clean gradient | very simple art and tiny files |
The outer contour is independent of the preset and is off by default.
<path>, <linearGradient>, <radialGradient>, <ellipse>, <mask> and a <clipPath> — no raster image.<image>, data:image, and base64 payloads are rejected.$DSH_HOME/svg-studio/outputs/ and pruned to the newest 40.The Studio talks to three exact, local-only routes served by the Host plugin:
| Method | Route | Purpose |
|---|---|---|
GET | /svg-studio/api/health | Python, Pillow and numpy availability |
POST | /svg-studio/api/generate | data-URL or file-path generation |
GET | /svg-studio/file?name=<name>.svg | serve a saved output from the output directory |
These routes are registered on the local Harness web server and are not intended to be exposed publicly.
source image
│ normalize / flatten
▼
adaptive palette (median cut)
▼
colour-family masks → connected components → closed contours with holes
▼
figure silhouette (border background + component cleanup + hole handling)
▼
pre-clip colour paths to figure · local face-detail palette in a soft mask
▼
clean backdrop gradient (no synthetic halo) · optional outer contour
▼
closed-contour RDP simplification · XML and purity validation
▼
.svg
Key behaviours fixed in this release:
original background mode.ctx.webServer, ctx.tools, ctx.skills.dsh-xiangwriter-svg-studio/
├─ index.js Host half: skill, tool, HTTP routes, Python detection
├─ client.js Web Studio page + sidebar icon (module id: dsh-xiangwriter-svg-studio)
├─ engine/svg_engine.py Pillow + numpy vector engine
├─ engine/requirements.txt Python dependencies
├─ skill.md Agent workflow and quality gates
├─ locale/ en / zh metadata and UI dictionaries
├─ cordis.patch.yml Bundle patch (row id: svg-studio)
├─ icon.svg Plugin mark with the xiangwriter seal
├─ assets/ README banner and xiangwriter mark
├─ tests/smoke_engine.py Synthetic end-to-end engine smoke test
└─ .github/workflows/ci.yml JS/Python checks and smoke test
# JS syntax
node --check index.js
node --check client.js
# Python environment and smoke test (no Chrome needed)
python -m pip install -r engine/requirements.txt
python -m py_compile engine/svg_engine.py
python tests/smoke_engine.py
The smoke test creates its own synthetic flat-colour image, runs the engine, and asserts that the result is pure SVG, has no haloGrad, has no outer-outline, and is structurally valid. It does not use any third-party artwork.
Personal, non-commercial use only. This is a source-available, proprietary licence, not an OSI open-source licence.
xiangwriter name and mark identify the author and must remain intact.© 2026 xiangwriter. All rights reserved.