This guide is based on Baidu's Hugging Face model card, its GitHub repository and project page, plus NVIDIA's and Astral's own installation documentation, all read on 4 December 2026. Any claims about quality are Baidu's own.
Unlimited-SVG is a new open model from Baidu's ERNIE multimodal team that redraws an image as a structured, editable SVG file. Baidu presented it on 1 December 2026 and released it under the MIT licence. Rather than tracing pixel edges like a classic vectoriser, it writes SVG code, and Baidu says it separates foreground from background and rebuilds a scene "layer by layer in a clean, logical order". It's built on DeepSeek-OCR and uses a mixture-of-experts design that activates only about 0.5B parameters per token, which is why Baidu pitches it as a "compact, locally deployable model". Here's how to run it on your own PC.
What you need
An NVIDIA graphics card. Baidu's instructions call for "a compatible NVIDIA driver, and a free BF16-capable GPU". There's no official AMD, Intel or Apple route, and no CPU-only option in the instructions.
Linux, or Windows with WSL2. Baidu's commands are written for x86-64 Linux. On a Windows PC, the practical route is WSL2 with NVIDIA's CUDA on WSL support.
At least 7GB of free disk space for the model, plus room for the Python environment. The single weights file in Baidu's repository is about 6.7GB, stored in BF16, and it downloads to your Hugging Face cache the first time you run the model.
Enough video memory. Baidu doesn't list a minimum. The weights alone are about 6.7GB, so our estimate is that an 8GB card will be very tight once the long SVG output is added, and a 12GB or 16GB card such as the ASUS RTX 5070 12GB Dual OC or ASUS RTX 5060 Ti 16GB Dual OC is a safer bet. Treat that as guidance, not a tested figure.
If you just want to see what it does first, Hugging Face hosts an online demo Space (Unlimited-SVG-ZeroGPU). That runs in the cloud, though, so don't upload anything private.
Step 1: Set up WSL2 with GPU support (Windows only)
NVIDIA's CUDA on WSL guide says to install the latest GeForce or RTX Windows display driver first, then install WSL. Its key warning is that the Windows driver "is the only driver you need to install. Do not install any Linux display driver in WSL." NVIDIA also notes that GPU acceleration in WSL is available on GeForce and RTX cards running in WDDM mode, and not on data centre GPUs. Our guide to setting up WSL2 for local AI walks through the whole process.
Step 2: Install uv
Baidu's instructions use uv, Astral's fast Python package manager, to build an isolated environment. Inside Linux or WSL2, Astral's documented installer is:
curl -LsSf https://astral.sh/uv/install.sh | sh
See our uv guide for local AI if you haven't used it before.
Step 3: Get the code and create the environment
Clone Baidu's GitHub repository (github.com/baidu/Unlimited-SVG) and work from its root folder, as the instructions say. Baidu's Transformers route creates a Python 3.12 environment and installs pinned versions of PyTorch 2.6.0, Transformers 4.46.3 and a handful of helper libraries. Copy the full uv pip install command from the model card rather than retyping it, because the exact versions matter. It starts like this:
uv venv .venv-svg-hf --python 3.12
uv pip install --python .venv-svg-hf/bin/python torch==2.6.0 torchvision==0.21.0 transformers==4.46.3 ...
Step 4: Save the inference script and convert an image
The model card includes a complete Python script that Baidu asks you to save as infer_hf.py. Then you run it on an image:
CUDA_VISIBLE_DEVICES=0 .venv-svg-hf/bin/python infer_hf.py /path/to/image.png
The script scales the long edge of your picture to 2,048 pixels, centres it on a grey 2048 x 2048 canvas and fills transparent areas with white "so images with alpha do not turn black". It writes the result to output.svg after checking that it parses as valid XML. If the output is incomplete, it stops with an error and leaves the raw text in output.txt. The first run downloads the weights. After that, the cached copy is reused.
If PyTorch says it can't see your graphics card, see how to fix "PyTorch CUDA not available".
Step 5: Set the temperature for the kind of image
The script is greedy (deterministic) by default. Baidu's advice is:
CAD drawings, diagrams, charts and anything needing exact detail: keep the temperature low, around 0 to 0.3, "to preserve precise geometry and text".
Photos and natural scenes: raise it to around 0.5 to 0.8 "to avoid repetitive loops and encourage more varied strokes".
In the Transformers script, you do this by passing do_sample=True and a temperature value.
Optional: run it as a local server with vLLM
Baidu also documents a vLLM route that runs Unlimited-SVG as a local server with an OpenAI-style API on 127.0.0.1 port 10000, plus a second script (infer_vllm.py) that sends images to it. It needs its own environment, and Baidu includes a one-off patch to set vLLM's image processor to 2048 x 2048 without tiling. It's more involved, so start with the Transformers route. If you want to go further, our vLLM on WSL2 guide covers the basics.
Edit the result
The output is a normal SVG file, so you can open it in Inkscape or another vector editor to tidy it up. See our Inkscape setup guide, our comparison of Unlimited-SVG and Inkscape's Trace Bitmap and our pick of the best image-to-SVG converters.