baidu/Unlimited-SVG

Baidu ERNIE Multimodal Team's Unlimited SVG (released on 12 1, MIT license): Input an image, output complete SVG code to redraw illustrations, charts, CAD drawings, photos, etc., into editable vector graphics. The model is based on DeepSeek-OCR: the DeepEncoder on the input side compresses a full 2048×2048 image into 1024 visual tokens, preserving small text, thin lines, and precise coordinates; the decoder side is an MoE, activating only about 0.5B parameters per token.

Baidu ERNIE Multimodal Team's Unlimited SVG (released on 12 1, MIT license): Input an image, output complete SVG code to redraw illustrations, charts, CAD drawings, photos, etc., into editable vector graphics. The model is based on DeepSeek-OCR: the DeepEncoder on the input side compresses a full 2048×2048 image into 1024 visual tokens, preserving small text, thin lines, and precise coordinates; the decoder side is an MoE, activating only about 0.5B parameters per token.

Why It Matters Based on DeepSeek-OCR, it activates only about 5 hundred million parameters per token. Officially, it claims that complex SVGs with tens of thousands of tokens can be generated in real time, deployable locally on a single GPU.

Rising Score 748 · Likes 805 · Downloads 206

Reasons

  • Officially, complete SVGs for complex images often exceed 10,000 tokens; large models are slow and expensive when generating such long outputs. This version relies on visual token compression and sparse decoding to enable real-time generation of ultra-long SVGs on smaller models that can be deployed locally.
  • The model card provides temperature adjustment recommendations by image type: use 0–0.3 for CAD, diagrams, and charts to maintain geometric and textual precision; use 0.5–0.8 for natural scenes and photos to avoid repetitive loops and achieve more diverse strokes.
  • Includes GitHub code, a ModelScope version, and a ZeroGPU online demo on Hugging Face. The model card begins with animated examples of conversions for various image types.

Usage

  • transformers (officially pinned to torch 2.6.0, transformers 4.46.3): AutoModel.from_pretrained("baidu/Unlimited-SVG", trust_remote_code=True); first pad the image to a 2048×2048 gray-background square using ImageOps.pad (fill transparent pixels with white first), then call model.infer(prompt="<image> SVG:", base_size=2048, image_size=2048, crop_mode=False), set max_new_tokens to 30000, and extract <svg>…</svg> from the output.
  • vLLM 0.33.0: First run the script in the model card to modify the deepseek_ocr processor to 2048 without chunking, then run vllm serve baidu/Unlimited-SVG --trust-remote-code --max-model-len 32768, and send the image and the "<image> SVG:" prompt via the OpenAI-compatible interface.

Risks

  • The model card lacks any quantitative evaluation and does not specify total parameter count or VRAM requirements; it only provides steps for x86-64 Linux + NVIDIA GPU, and the vLLM route requires modifying source code in installed packages.
  • Requires trust_remote_code; output may be incomplete (the example script reports Incomplete SVG), and the file size and editability of SVGs converted from photo-type images are unknown; this entry has not been run.

Open

Hugging Face Trending

Explore the latest AI Radar updates