---
title: "How to Run Unlimited SVG Locally: Image to Editable SVG"
url: "https://goremy.ai/blog/articles/unlimited-svg-run-locally-image-to-svg"
author: Luis Chavez-Mattos
editor: Luis Chavez-Mattos
editor_title: Director, Product
published: "2026-12-03T02:20:17.873Z"
updated: "2026-12-03T02:20:17.873Z"
topic: Local AI
description: Unlimited SVG, built on DeepSeek OCR, redraws images as editable SVG with about 0.5B active parameters. Here is what it needs and how to run it locally.
---

# How to Run Unlimited SVG Locally: Image to Editable SVG

> Unlimited SVG, built on DeepSeek OCR, redraws images as editable SVG with about 0.5B active parameters. Here is what it needs and how to run it locally.

Edited by Luis Chavez-Mattos, Director, Product · Published 2026-12-03

## What is Unlimited SVG and can you run it on your own computer?

Unlimited SVG is an open-weight model from Baidu that takes an image and redraws it as an editable SVG file, which is vector code you can open in a design tool or drop into a web page. It is built on DeepSeek-OCR and activates only about 0.5 billion parameters per token, so it is small enough to run locally. The official instructions target Linux with an NVIDIA GPU. A creator demoing it locally reported it using just under 2 GB of VRAM.

## TL;DR

- **Unlimited SVG turns a picture into SVG code**, a file with exact shapes, colors and layers that you can edit, rather than a flat image.
- **It is small on purpose.** A mixture-of-experts design means only about 0.5B parameters are active per token, which keeps long outputs fast.
- **The official setup assumes x86-64 Linux, `uv`, an NVIDIA driver and a BF16-capable GPU.** A demo run showed under 2 GB of VRAM in use, and the presenter said CPU is possible but needs good memory and processors.
- **Temperature matters.** Baidu recommends 0 to 0.3 for charts, diagrams and CAD, and 0.5 to 0.8 for photos and natural scenes.
- **It works best on logos, charts and diagrams.** Complex art and photos come out as flat illustrations, and small text can be wrong.
- **You can try it without installing anything** in a Hugging Face Space made for the model.

## Why turn an image into SVG at all?

A written description of a picture can name what is in it, but it cannot pin down exact shapes, fonts, layouts or colors. You also cannot check the description against the original.

SVG fixes that. It is code that renders straight back into an image, with exact coordinates, colors and layers. If the model gets something wrong, you see it immediately by comparing the render to the original. And because the output is code, you can edit it, restyle it, or port it into a website.

Baidu lists logos, charts, diagrams and CAD drawings as target uses, and the demo also tried scenes and characters. Baidu also frames SVG as a way to teach vision-language models to see every detail of an image.

## How does Unlimited SVG work?

The hard part of image-to-SVG is length. A complete SVG for a complex image often runs past 10,000 tokens (tokens are the small chunks of text a model reads and writes). Large models get slow and expensive at that length. Unlimited SVG attacks the problem from both ends.

**On the input side**, a component called DeepEncoder compresses an entire 2048 × 2048 image into just 1024 vision tokens. Baidu says this keeps fine details such as small text, thin strokes and exact spatial coordinates.

**On the output side**, the model is a mixture-of-experts (MoE) design. Instead of running every parameter for every token, it routes each token through a small set of specialist sub-networks. Only about 0.5B parameters are active at a time. That is why it can keep generating well past 10,000 tokens at a useful speed on a compact model, instead of relying on a heavy frontier API.

## What hardware does Unlimited SVG need?

Here is what the sources say, and where they stop.

| Item | What the sources say |
|---|---|
| Operating system | x86-64 Linux (official instructions) |
| Tooling | `uv` for environments, Python 3.12 |
| GPU | A compatible NVIDIA driver and a free, BF16-capable GPU |
| VRAM in a demo | Just under 2 GB, as observed by a creator running it locally |
| CPU | The same creator said it can run on CPU, with good memory and processors |
| Input size | 2048 × 2048 global inference, no tiling |

Two cautions. First, the "under 2 GB" figure is one person's observation, not a guarantee from Baidu. Second, the official scripts call `.cuda()`, so the documented path needs an NVIDIA GPU. Running on CPU is something the demo creator said is possible, but you would be going beyond the instructions Baidu published.

If you use vLLM (a serving tool for running models), the sample command sets `--gpu-memory-utilization 0.8`. That tells vLLM how much of the GPU's memory to claim, so it will reserve far more than the model strictly needs. Lower it if you share the card with other work.

## How do you run it step by step?

Baidu gives two routes: Hugging Face Transformers, and vLLM. Transformers is the simpler one to start with.

1. **Create an environment.** Run `uv venv .venv-svg-hf --python 3.12`.
2. **Install the pinned packages.** The model card lists exact versions, including `torch==2.6.0`, `transformers==4.46.3` and `tokenizers==0.20.3`. Copy the full command from the [model card](https://huggingface.co/baidu/Unlimited-SVG) rather than retyping it, because the versions matter.
3. **Save the inference script** from the model card as `infer_hf.py`.
4. **Run it on an image:**

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

The first run downloads the weights from Hugging Face into your local cache. Later runs reuse the cached files.

The script handles preparation for you. It resizes the long edge to 2048 pixels, keeps the aspect ratio, and centers the image on a gray 2048 × 2048 canvas. Transparent pixels are placed on white first, so a logo with a transparent background does not turn black. It then uses the prompt `<image> SVG:`, allows up to 30,000 new tokens, and writes two files: `output.txt` (the raw model output) and `output.svg` (the cleaned result). If the output is cut off and no complete `<svg>` is found, the script stops with an "Incomplete SVG" error and you can inspect `output.txt`.

### What about vLLM?

The vLLM route runs the model as a local server (on 127.0.0.1, port 10000) that you query with an OpenAI-style client. It needs a different set of pinned packages, a small patch that sets the image processor to 2048 × 2048 without tiling, and a long `vllm serve` command. It is worth it if you plan to send many images through one running server. For a first try, use Transformers.

## What temperature should you use?

Both official examples run greedily by default (`do_sample=False` in Transformers, `temperature=0` in vLLM), which gives the same output every time. Baidu suggests tuning by image type:

- **CAD, diagrams, charts and anything that needs exact detail:** keep temperature low, around 0 to 0.3, to preserve geometry and text.
- **Natural scenes and photos:** raise it to roughly 0.5 to 0.8, which helps avoid repetitive loops and encourages more varied strokes.

To sample in Transformers, you edit the script to pass `do_sample=True` and a `temperature` instead of the greedy override. In vLLM, you set `temperature` in the request.

Do not expect temperature to fix everything. In the demo, a bar chart run at 0.5 came out with wrong text, and a rerun at 0.3 still mixed up labels. The creator also noted a label that read "L4 GPU" in the original coming out as "14 GPU." Low temperature helps with consistency, but it does not make text reading perfect.

## How good are the results?

The demo creator ran four tests, and they show a clear pattern.

| Test image | What happened |
|---|---|
| Cola ad | Finished in under a minute, text looked good, rendered live |
| Dense ancient scene | About 49 seconds at 244 tokens per second, over 11,000 tokens. Kept layout, palette and border. Lost the stone texture, mangled faces, and the figure count did not match |
| Bar chart | About 4 seconds. Bar heights, colors, legend, layout and rotated labels matched closely. Text had errors |
| AI-generated street scene | Kept the red car, traffic light, crosswalk and distant car, but looked like a flat illustration and the car's wheel was oversized and misplaced |

The takeaway is that it keeps layout, colors and structure well and is fast, but it is not pixel perfect. For logos, charts and diagrams it looks like a practical tool. For photos and intricate artwork, expect a stylized approximation.

## Can you try it without installing anything?

Yes. A demo is available as a Hugging Face Space ("Unlimited-SVG-ZeroGPU") created by AK and Hugging Face, linked from the model card. The interface shows your input on the left and the SVG on the right, with a preview tab and a source tab so you can see both the render and the code. The model is also on ModelScope.

## What does this mean for you?

**If you work in design, marketing or communications:** you often receive logos or charts as screenshots or low-resolution files. A tool like this can give you an editable starting point. Treat the output as a draft. Check every piece of text against the original before it goes anywhere public.

**If you work with documents and reports:** a chart that exists only as an image can become code you can restyle. The text errors seen in testing mean you should verify every label and number.

**If you handle sensitive material:** running locally means the image never goes to an outside API, which can matter for internal diagrams or unreleased branding. Check your company's rules on installing and running open-weight models first.

**What to do first:** try the Hugging Face Space with three of your own images, one logo, one chart and one photo. You will learn quickly which kinds of work it handles for you.

## Could you build a small tool around a conversion workflow?

If your team keeps asking for the same thing, such as "can someone turn this into a vector file," a shared request tracker is more useful than a chat thread. With [Remy](https://goremy.ai), you can describe an intake form in plain English: people upload an image, pick the type (logo, chart, diagram), and see a status, an owner and the finished file in one place. Remy builds and deploys the full app, with sign-in, a database and file storage included, so you are not stitching together a spreadsheet and an email inbox. The conversion itself would still happen in whatever tool you choose.

## Frequently Asked Questions

### Who made Unlimited SVG?

Baidu's ERNIE multimodal team released it, with code on GitHub and weights on Hugging Face and ModelScope. The model card lists a release date of December 1, 2026. It is built on DeepSeek-OCR.

### Can I run Unlimited SVG without a GPU?

The official instructions assume an NVIDIA GPU with BF16 support. The creator in the demo said it can run on CPU if you have good memory and processors, but that is not part of Baidu's documented setup. Expect it to be slower, and be ready to adapt the scripts yourself.

### Is the SVG output accurate enough to use as-is?

For simple logos, charts and diagrams, the structure is often close. Text can come out wrong, and photos turn into flat illustrations with warped details. Always compare the render against your original before using it.

### What image size does it expect?

It works on 2048 × 2048 inputs. The official scripts resize your image so the long edge is 2048 pixels, keep the aspect ratio, and center it on a gray square canvas without tiling.
