Baidu Unlimited SVG Turns Any Image Into Editable SVG Code

ComfyUI Wikinews

Baidu ERNIE's Unlimited SVG redraws an image as an editable SVG with about 0.5B active parameters. MIT weights, CLI inference, and a community ComfyUI node.

Baidu's ERNIE Multimodal team published Unlimited SVG on December 1. It redraws a picture as layered, editable SVG code instead of pixels, and the weights are on Hugging Face under MIT.

Most image models hand back a bitmap you can only retouch. Unlimited SVG returns coordinates, shapes, colors and text as SVG, so the result opens in any vector editor with every element still separate. Baidu built it on DeepSeek-OCR and keeps only about 0.5B parameters active per token, which is what lets it write SVGs longer than 10,000 tokens at real-time speed.

A case from the official gallery

One case from the official gallery: the source picture and the SVG it generates.

At a glance
Weightsbaidu/Unlimited-SVG, 6.7 GB bf16
LicenseMIT
Codebaidu/Unlimited-SVG
DemoHF Space, blog
ComfyUICommunity node only (ComfyUI-UnlimitedSVG)

How it works

The image side is compressed hard: DeepEncoder turns a full 2048 × 2048 picture into 1,024 vision tokens while keeping small text, thin strokes and exact positions. The decoder is a 12-layer mixture-of-experts model that fires roughly 0.5B parameters per token, so the long SVG output does not fall off a speed cliff.

The result is a real drawing, not a trace. Baidu describes the model separating foreground from background, reasoning about shapes hidden behind others, and rebuilding the scene layer by layer.

Running it

The managed path is a Hugging Face Space. Locally, Baidu documents two CLI routes, Transformers or vLLM, on x86-64 Linux with an NVIDIA GPU that supports BF16:

CUDA_VISIBLE_DEVICES=0 .venv-svg-hf/bin/python infer_hf.py /path/to/image.png

Input handling matters more than settings: images are padded to a 2048 × 2048 square on a gray canvas (never tiled), and transparent areas are composited onto white first. Output is greedy by default. Temperature is the one knob worth changing:

InputTemperature
CAD, diagrams, charts0 to 0.3
Photos, natural scenes0.5 to 0.8

Low values keep geometry and lettering exact; higher values stop the model looping on short repeated strokes in busy photographs. Generation allows up to 30,000 tokens, and the example script fails loudly if the returned text is not a closed, parseable <svg> block.

In ComfyUI

There is no official ComfyUI node and no Comfy-Org repackage yet. A community node appeared the same day: Nynxz/ComfyUI-UnlimitedSVG wraps the Hugging Face weights and a mirrored copy at nynxz/Unlimited-SVG, and is installed like any custom node. Treat it as a preview: it is hours old, and the official path is still the CLI.

Availability

Weights are MIT-licensed on Hugging Face with a ModelScope mirror, and the inference scripts ship in the GitHub repo. The documented setup assumes a Linux box with a BF16-capable NVIDIA GPU; AMD and Apple users are limited to the Space demo for now.

Comments

Sign in with GitHub to join the discussion.

Loading comments…
Baidu Unlimited SVG Turns Any Image Into Editable SVG Code | ComfyUI Wiki