Baidu's Unlimited-SVG Squeezes 2048×2048 Images Into 1,024 Tokens to Redraw Editable Vectors Locally
The MIT-licensed model activates half a billion parameters per token on a single Linux NVIDIA GPU, turning diagrams and photos into clean XML without paying frontier API bills.

Auto-tracing a complex graphic usually leaves you with a soup of jagged polygons that crashes your browser the second you open it in an editor. On December 1, 2026, Baidu’s ERNIE multimodal team open-sourced Unlimited-SVG under the MIT license, pitching a model that “redraws any image as a structured, editable SVG using just 0.5B activated parameters.” The repository—subtitled Unlimited SVG Works: Trace On — Projection of Visual Worlds into SVG-Anything—already sits at 2,600 GitHub stars and 209 forks, with weights hosted on Hugging Face (baidu/Unlimited-SVG), ModelScope, and a live Hugging Face Spaces demo.
Long-horizon vector generation breaks most vision models from both sides. A dense illustration or UI diagram routinely demands more than 10,000 tokens of raw XML, which turns metered cloud inference into a slow, expensive hobby (your finance team loves a five-figure bill for icons). Unlimited-SVG attacks the input first: its DeepEncoder compresses an entire 2048×2048 image into 1,024 vision tokens without tiling, “preserving fine details such as small text, thin strokes, and exact spatial coordinates.” Keeping the visual prefix tiny leaves room in the context window for the actual drawing.
On the output side, a mixture-of-experts decoder activates roughly 0.5 billion parameters per token. As the team summarizes the design, “Minimal visual prefix meets sparse active compute.” That combination keeps decoding moving past 10,000 tokens on a single BF16-capable NVIDIA GPU running x86-64 Linux with uv—the kind of box sitting under a desk instead of a rented data-center rack. Both reference scripts cap output at 30,000 tokens, extract the <svg> block with a regular expression, and run it through Python’s ElementTree.fromstring validator so broken XML fails loudly before landing in output.svg.
The plumbing reveals the real-world edge cases the authors already tripped over. Both infer_hf.py and infer_vllm.py normalize EXIF orientation, composite transparent RGBA, LA, or PA pixels onto solid white so alpha channels do not render black, and pad the image onto a neutral gray (127, 127, 127) 2048×2048 canvas using bicubic resampling. Sampling temperature splits cleanly by job: leave it greedy at 0 to 0.3 for CAD drawings, charts, and diagrams where exact coordinates matter, or push it to 0.5 to 0.8 for photos and natural scenes so the model avoids repetitive stroke loops. Call it a classic case of staying on the right path (literally, in <path> tags).
Getting the faster vLLM serving path running still feels delightfully old-school Linux. While the Transformers script runs straight out of a Python 3.12 virtual environment with torch==2.6.0 and transformers==4.46.3, the vLLM setup requires running an inline Python patch directly against a processor file inside site-packages to hardcode BASE_SIZE = 2048, IMAGE_SIZE = 2048, and CROP_MODE = False, followed by a wall of flags disabling prefix caching and pinning the server to 127.0.0.1:10000 with a 32,768-token context window. Nothing says “production ready” like regex-editing your own dependencies at startup.
Expect sparse active-parameter decoders paired with aggressive vision compression to show up across every other structured-code task that chokes on long outputs—think UI layouts, CAD scripts, and circuit schematics. Paying a massive dense model to emit ten thousand lines of repetitive coordinates was always overkill, like hiring a concert pianist to tap out Morse code. If a single BF16 workstation card can reliably turn legacy screenshots and scanned diagrams into editable vectors at zero marginal token cost, teams sitting on decades of raster documentation finally have a practical escape hatch. The remaining friction—manual site-packages patches and Linux-only CUDA setup—is exactly the kind of rough edge the open-source ecosystem usually wraps into a one-command container within weeks.
Your raster logos just ran out of excuses.