Option 1: convert an image to SVG online
The quickest way is the converter on the UnlimitedSVG.net homepage. There is nothing to install, and you can watch the SVG appear while the model writes it.
- Upload an image. A PNG, JPEG or WebP up to 10 MB. Transparent areas are placed on white, as in the official pipeline.
- Choose what it shows. “Logo, icon or diagram” uses temperature 0 for exact shapes; “Photo or illustration” uses 0.6 for smoother color regions.
- Convert and watch. Simple graphics usually finish in under a minute; detailed images can take several minutes.
- Download or copy. Save the .svg file, or copy the code into your editor. If the conversion fails, the credit is refunded.
Option 2: run Unlimited SVG with vLLM
The repository includes a vLLM setup in its own Python 3.12 environment. Before serving, a small script patches vLLM’s DeepSeek-OCR processor to use a 2048 base size, a 2048 image size and no cropping, so the server sees images the way the model was trained.
The official serve command names the model Unlimited-SVG, enables trust-remote-code, allows one image per prompt and sets a 32,768-token context. Requests go to the OpenAI-compatible chat endpoint with the image as a base64 PNG data URL and the text “<image> SVG:”, with up to 30,000 output tokens and streaming on.
- Preprocess: apply EXIF orientation, flatten transparency onto white, then pad to 2048 × 2048 with gray (127, 127, 127).
- Decode: temperature 0 for graphics (higher for photos), top_p 1, top_k 0, repetition penalty 1.
- Postprocess: keep the first complete <svg>…</svg> block and check that it parses as XML.
Option 3: run it with Transformers
For a single image without a server, the infer_hf.py script loads the model with Transformers in BF16 on a CUDA GPU and calls its built-in infer method with the same prompt and a 2048 base size. It writes the raw output and the extracted SVG to files.
Tips for better SVG results
A few habits help, online or self-hosted.
- Crop to the subject: the whole image is fitted into one 2048 × 2048 canvas, so empty margins waste detail.
- Prefer clean sources: a sharp PNG of a logo converts better than a blurry screenshot of it.
- Expect large files for photos: every color region becomes a shape, so detailed photos can produce SVGs of hundreds of kilobytes.