Skip to content
Proyectos

Acerca de

Turn any picture into structured, editable, layered SVG on Windows - local CPU or NVIDIA CUDA. A/B slider, Photoshop-style layers, layered PSD export, DeepSeek AI layer naming. Powered by Baidu Unlimited-SVG (MIT).

IA y aprendizaje automático

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
+1
in 7 days
Recopilando historial
in 15 days
Recopilando historial
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original
Picture2SVG

Picture2SVG

Turn any picture into structured, editable, layered SVG — locally, on Windows.

Language 中文

Platform Python License Model Backend Download

A/B slider comparison · Photoshop-style layer panel · Layered PSD export · DeepSeek AI layer naming · EN / 中文


⬇️ Direct Download

No Python. No CUDA toolkit. No dependencies. Pick one file and run.

Download Size What it is
⬇ Picture2SVG-Setup.exe 65.5 MB Recommended. Graphical Windows installer: choose install folder, create desktop / Start Menu shortcuts, launch when done.
⬇ Picture2SVG.exe 65.4 MB Portable single file. No _internal folder, no install — copy anywhere and double-click.

→ See all builds on the Releases page · Windows 10 / 11, x64

First launch: a 2-step onboarding guide

The app is intentionally tiny (65 MB). The heavy parts are fetched on demand, from official upstream sources, into a folder you choose:

StepWhat happens
1 · Runtime
~250 MB CPU
~2.7 GB CUDA
The onboarding guide detects your GPU and offers NVIDIA CUDA 12.4 or CPU PyTorch. One click downloads and configures an isolated Python 3.12 runtime — every package from its official source: python.org · download.pytorch.org/whl/cu124 · /whl/cpu · pypi.org. Live progress + pip log in the dialog.
2 · Model
6.67 GB
baidu/Unlimited-SVG weights are downloaded from Hugging Face, hf-mirror.com or ModelScope — resumable, or point at a folder you already have.

Nothing is bundled, nothing is silently installed system-wide: the runtime lives in a folder you pick and can be deleted like any other folder.


📸 Screenshots

A/B slider — original on the left, vector redraw on the right, drag the divider

A/B slider comparison



Photoshop-style layer panel — visibility, solo, rename, reorder, per-layer export

Chinese UI with layer panel



Onboarding guide
First-run onboarding — bilingual, detects your GPU
Runtime environment settings
Runtime Environment — official PyTorch install, live log

🖼 Real-world examples

Every pair below is an unedited field run on a stock build — left half is the original raster, right half is the actual exported SVG re-rendered as-is. No retouching, no cherry-picking. Each caption links the raw .svg (20–50 KB!) so you can drop it straight into Illustrator / Inkscape / Photoshop and inspect the layers yourself — the dot-separated names are the model's own semantic layer groups.

Wild bird close-up — Canon EOS-1D X Mark II · 5472×3648 → 8 layers body · neck-plumage · head-feathers · face · wing-base · flight-feather-coverts · foreground-leg

raw SVG · 36 KB · original

Bird in bright foliage — Canon EOS-1D X Mark II · 5472×3648 → 7 layers foliage · body · tail-wing · wing · head-and-neck-details · foreground

raw SVG · 28 KB · original

Golden retriever portrait — 1536×1536 → 12 layers rear-coat-locks · head · ear-shading · forehead-and-cheek-fur · eyes · mouth · tongue · front-legs · outer-fur-details · coat-texture

raw SVG · 23 KB · original

Perched bird — most granular photo run — 2339×2339 → 14 layers distant-twigs · background-perch · bird-tail · bird-body · bird-folded-wing · bird-legs-and-feet · bird-head-and-neck · bird-beak · bird-eye · perching-branch · foreground-tail-branch

raw SVG · 28 KB · original

Modern glass tower — noise-reduced shot · 5472×3648 → 7 layers distant-construction · rear-building · main-tower · facade-reflections · roof-and-roof-trim · foreground-dome

raw SVG · 21 KB · original

AI-generated park bench — MiniMax H3 t2i · 2496×1664 → 14 layers distant-buildings · distant-woodland · tree-trunks · overhead-foliage · distant-people · litter-bin · bench-frame-rear · bench-seat · bench-back-slats · bench-arms · foreground-grasses · sunlit-details

raw SVG · 34 KB · original

AI-generated misty lake — MiniMax H3 t2i · 5024×3360 → 7 layers lake-and-reflections · mountain-range · shoreline-and-distant-ripples · mist-and-water-highlights · midground-rocks · foreground-rocks

raw SVG · 49 KB · second run · 45 KB · original

Anime character, front view — deepest tree — 1760×1344 → 22 layers sweeping-tail · back-hair · maid-headdress · side-bows · hair-ribbons · dress-body · sleeves · collar-bow · apron · shoes · skirt-ruffles · face · eyes-and-expression · hair-cap · temple-curls · forehead-ornament …

raw SVG · 33 KB · original

①②⑤ are real photographs (①② on a Canon EOS-1D X Mark II); ⑥⑦ are AI-generated stills and ⑧ an illustration — included to show how layering behaves on synthetic art. Raster files over 4 MB were recompressed for repo weight; the SVGs are byte-for-byte the app's exports.


✨ Why this is different

Most image→SVG tools give you one flat path soup. Picture2SVG gives you a layered document you can actually edit — because Unlimited-SVG redraws images stroke-by-stroke into grouped, id-tagged SVG elements, and this app turns every one of them into a real layer.

FeatureDetails
🎚 Five comparison modes Slider (drag / arrow keys ±1 %, Shift ±5 %) · Side by side · Crossfade (mouse wheel) · Difference heatmap · Hold Space to flip. Fully hot-switchable, divider position preserved. Either side can show the original or the SVG composite — mix freely.
🗂 Real layer tree Every top-level SVG child becomes a layer (structure-agnostic: works with any model output). Eye toggle, Alt+click for Solo, double-click rename, drag to reorder paint order, per-layer export checkbox, delete, live-rendered thumbnails and colour swatches.
💾 Layered PSD export Not a flattened image — a genuine Photoshop document with one layer per SVG group, correct names, correct visibility state, and a flattened composite preview baked in.
⏹ Stop anytime, keep the work Generation is streamed token by token with live re-render. Stop during decoding → the partial SVG is auto-closed and stays fully editable. Stop during vision prefill → the worker is recycled in 1.6 s (nothing had been produced yet).
🤖 AI layer naming Optional DeepSeek (any OpenAI-compatible endpoint) reads each layer's structure — element type, geometry, palette, text content — and returns professional layer names + semantic groups, in English or Chinese.
🌐 Bilingual UI English by default. One click on `EN / 中文` — or the picker in Settings — and the whole interface, dialogs, onboarding guide and default layer names switch instantly, no restart.
🧠 Runs on your terms CPU-only laptop or NVIDIA GPU. Zero-copy `mmap` weight loading on Windows (≈2 s model load, ~350 MB private RAM) so 16 GB machines work; BF16 CUDA when a card is present. AMD/Intel GPUs simply fall back to CPU.
✈️ No model redistribution The app contains no weights and ships no torch build. Both come straight from official mirrors, so licensing stays clean and the download stays 65 MB.

🚀 Quick start

Option A — Installer (recommended)

  1. Download Picture2SVG-Setup.exe from Releases.
  2. Run it, pick a folder, tick desktop shortcut, click Install Now.
  3. Follow the 2-step onboarding guide → then open an image and press Vectorize.

Option B — Portable

Copy Picture2SVG.exe anywhere (USB stick works) and double-click it.

Option C — From source

git clone https://github.com/ptdove-jiuzi/Picture2SVG.git
cd Picture2SVG

uv venv .venv --python 3.12
uv pip install --python .venv\Scripts\python.exe -r requirements.txt

python run.py

Source mode needs the AI packages locally (requirements.txt). The packaged EXE does not — it fetches them through Settings.


⚙️ Hardware & measured performance

All numbers below are measured, not estimated — Intel i5-12490F (6C/12T), 16 GB RAM, no NVIDIA GPU, mmap precision, 1024 × 1024 inference:

Stage Measured
Model load (mmap, zero-copy) ~2 s, ~350 MB private RAM
Vision encoding + prefill ~52 s
Token decoding 17.5 tok/s
Simple image end-to-end (235 tokens) 76 s
Complex image (≈10 k tokens) ~10 min — interruptible, partial result kept
Resident working set ~6.4 GB (file-backed pages, not commit)

With an NVIDIA GPU the same build runs the official BF16/CUDA path (torch.autocast("cuda", bfloat16), 2048 × 2048 global view) and is dramatically faster. GPU timings are hardware-dependent and were not measured on the development machine — contributions of benchmark numbers are welcome.

Tier Requirement Recommended settings
CPU 16 GB RAM, AVX2, ~3 GB free on the runtime drive resolution 1024, precision auto (mmap), low-memory attention ON
CPU (tight RAM) 8 GB RAM resolution 1024, close other apps
NVIDIA GPU Any BF16-capable card (12 GB+ VRAM comfortable) resolution 2048, precision auto (BF16)

🧩 How it works

┌────────────── Picture2SVG.exe (65 MB, no torch inside) ───────────────┐
│  Qt GUI: A/B compare view · layer panel · settings · onboarding      │
│                                                                     │
│  QProcess ──JSON-lines──►  <your runtime>/python.exe                 │
│                            -m picture2svg.core.worker               │
│                                    │                                │
│                                    ├─ model_loader  (mmap / BF16)   │
│                                    ├─ runner        (stream + abort)│
│                                    └─ svg doc       (partial-safe)  │
│                                                                     │
│  Exports (GUI thread): SVG (all / checked / visible) · PSD · PNG     │
└─────────────────────────────────────────────────────────────────────┘
              ▲                                  ▲
   official Python + PyTorch          baidu/Unlimited-SVG weights
   (python.org / pytorch.org)         (Hugging Face · hf-mirror · ModelScope)

Why a subprocess? The model needs ~6.7 GB; the GUI needs ~150 MB. Isolating inference means the model can be unloaded on idle, cancelled safely, and a crash can never take the editor down with it.

Why is the EXE only 65 MB? PyTorch and Transformers are excluded from the build and executed by the external runtime you configure. The app also ships a tiny copy of the worker sources so that runtime can run them without a checkout.

picture2svg/
├── core/     worker (stdio protocol) · runner (device-agnostic inference)
│            env_manager (official runtime installer) · hw_probe · model_manager · deepseek
├── svg/      document (layer tree, partial-safe parsing) · render (Qt rasterizer)
├── export/   exporters (SVG / PSD / PNG) · psd (pytoshop compatibility layer)
└── ui/       main_window · compare_view · layer_panel · settings_dialog
             model_wizard (onboarding) · inference_bridge · icons

❓ FAQ

The runtime download failed / is slow. What now?

Retry — pip resumes where it stopped. Behind a slow link to PyPI, switch PyPI Package Index to the Tsinghua mirror in Settings → Runtime Environment. You can also press Browse… and select any existing Python 3.12 environment that already has torch + transformers.

Do I need to install CUDA or cuDNN myself?

No. The CUDA build pulls the official PyTorch wheels, which bundle the CUDA 12.4 runtime. You only need a reasonably recent NVIDIA driver. If no NVIDIA GPU is found the app stays on CPU automatically.

I have an AMD / Intel GPU. Can it be used?

The upstream model pipeline is CUDA-oriented, so non-NVIDIA cards run in CPU mode. It works, just slower.

Why `mmap` precision on Windows?

Official PyTorch Windows wheels ship without the INT8 quantized::linear CPU kernels, and resident BF16 needs ~8 GB of free commit. Memory-mapping the safetensors file keeps full BF16 fidelity while letting the OS page weights in and out — the model file itself is the backing store. Linux builds can use stream-quantized INT8 instead.

Where is my data / API key stored?

%APPDATA%\Picture2SVG\config.json. The DeepSeek key never leaves your machine except in requests to the endpoint you configure. Images are only read from disk and passed to your local model.

The output SVG has too few / too many layers.

Raise Max Generated Tokens (complex photos need 10 000+). For photos, try temperature 0.5–0.8 to avoid repetitive strokes; for CAD, diagrams and charts keep 0–0.3. You can also stop early and edit the partial result.


🙏 Model attribution

This project is a Windows front-end. All of the intelligence comes from Baidu's open-source model — please cite the model, not just this app.

Modelbaidu/Unlimited-SVG — “Unlimited SVG Works: Trace On — Projection of Visual Worlds into SVG-Anything”
AuthorBaidu Inc. — ERNIE Multimodal Team
LicenseMIT
Size3.34 B parameters total · ≈0.5 B activated per token (MoE)
LineageBuilt on DeepSeek-OCR: DeepEncoder compresses a 2048 × 2048 image into 1024 vision tokens; a DeepSeek-V2 MoE decoder redraws it as SVG
LinksGitHub · Hugging Face · ModelScope · Project page
@misc{unlimitedsvg2026,
  title  = {Unlimited SVG Works: Trace On -- Projection of Visual Worlds into SVG-Anything},
  author = {Baidu ERNIE, Multimodal Team},
  year   = {2026},
  url    = {https://unlimited-svg.github.io/}
}

How this repository relates to the official code

The upstream inference script targets Linux + CUDA. This project does not change the model's mathematics; it:

  1. reimplements model.infer()'s global-view path (crop_mode=False) in a device-agnostic way so it runs on Windows CPU and CUDA;
  2. applies one minimal, documented device patch to the official remote code on first load — masked_scatter_(…cuda()) → .to(inputs_embeds.device), original kept as .bak, behaviour on CUDA unchanged;
  3. adds streaming output, cancellation, chunked low-memory attention for 2048² SAM, and memory-mapped weight loading.

See NOTICE for the full third-party list.


Built with PySide6 (Qt for Python) · PyTorch · Hugging Face Transformers · pytoshop

Code: MIT · Model: MIT © Baidu Inc. · Weights are never redistributed by this project

If this saved you an afternoon of tracing, a ⭐ helps other people find it.

Explorar proyectos relacionados

Cargando…