Model reference · open weights
starvector-im2svg is an open-weight language model from starvector. starvector-8b-im2svg (BF16) weighs 15.0 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the starvector/starvector-8b-im2svg model card, 2026-10-01
What it is
| Released by | starvector |
|---|---|
| Released | 2025-01-11 |
| Parameters | 7.5B |
| VRAM | 15.0 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB … RTX 4060 Ti 16 GB 2 smaller cards | ||||
| RTX 3090 24 GB | 14 | 3 | 114K | 23.4 GB |
| RTX 4090 24 GB | 14 | 3 | 113K | 23.4 GB |
| RTX 5090 32 GB | 28 | 7 | 128K | 31.0 GB |
| L40S 48 GB | 52 | 13 | 128K | 44.0 GB |
| A100 80 GB | 116 | 29 | 128K | 78.2 GB |
| H100 80 GB | 109 | 27 | 128K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 139 | 34 | 128K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 164 | 41 | 128K | 107 GB |
| H200 141 GB | 221 | 55 | 128K | 138 GB |
| B200 180 GB | 290 | 72 | 128K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 12 | 3 | 101K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 26 | 6 | 128K | 15.4 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 16.3 GB | 17.9 GB |
| 5 | 18.4 GB | 26.5 GB |
| 8 | 20.0 GB | 32.9 GB |
| 16 | 24.3 GB | 50.1 GB |
| 32 | 32.9 GB | 84.4 GB |
| 64 | 50.1 GB | 153 GB |
One card, with vLLM's small-card settings.
From the model card
StarVector is a foundation model for generating Scalable Vector Graphics (SVG) code from images and text. It utilizes a Vision-Language Modeling architecture to understand both visual and textual inputs, enabling high-quality vectorization and text-guided SVG creation.
This is the model card for the StarVector model, a 🤗 transformers model. StarVector is a foundation model for generating Scalable Vector Graphics (SVG) code from images and text. It utilizes a Vision-Language Modeling architecture to understand both visual and textual inputs, enabling high-quality vectorization and text-guided SVG creation.
The StarVector architecture integrates an image encoder and a Large Language Model (LLM) Adapter to generate SVG code from both image and text inputs. Images are first converted into embeddings using a Vision Transformer (ViT), after which the LLM Adapter maps these embeddings into the LLM's embedding space to create visual tokens. Text prompts are handled through the LLM’s tokenizer and embedder. This unified multimodal approach ensures precise and contextually rich SVG output.
Image-to-SVG generation, Text-to-SVG generation.
Creation of icons, logotypes, technical diagrams, and other vector graphics.
Generating realistic photographic images or complex 3D graphics.
Potential biases may exist in the model due to the composition of the training data (SVG-Stack). The model's ability to perfectly vectorize all types of images and interpret all textual instructions may have limitations. Users should be aware of these potential issues, especially in critical applications.
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Further investigation into the model's behavior across different types of inputs is recommended.
Use the code below to get started with the model.
from PIL import Image
from transformers import AutoModelForCausalLM, AutoTokenizer, AutoProcessor
from starvector.data.util import process_and_rasterize_svg
import torch
model_name = "starvector/starvector-8b-im2svg"
starvector = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, trust_remote_code=True)
processor = starvector.model.processor
tokenizer = starvector.model.svg_transformer.tokenizer
starvector.cuda()
starvector.eval()
image_pil = Image.open('assets/examples/sample-18.png')
image = processor(image_pil, return_tensors="pt")['pixel_values'].cuda()
if not image.shape[0] == 1:
image = image.squeeze(0)
batch = {"image": image}
raw_svg = starvector.generate_im2svg(batch, max_length=4000)[0]
svg, raster_image = process_and_rasterize_svg(raw_svg)
SVG-Stack: A dataset of over 2 million SVG samples.
The model utilizes a Vision-Language Modeling architecture. Images are projected into embeddings via an image encoder, then mapped to the LLM hidden space using an LLM Adapter, generating Visual Tokens. Text conditioning is achieved with the LLM's tokenizer and embedder. The model learns to map token sequences (visual or textual) to SVG code.
SVG-Bench
SVG-Stack, SVG-Fonts, SVG-Icons, SVG-Emoji, SVG-Diagrams.
StarVector models achieve state-of-the-art performance on SVG generation tasks
We provide Hugging Face 🤗 model checkpoints for image2SVG vectorization, for 💫 StarVector-8B and 💫 StarVector-1B. These are the results on SVG-Bench, using the DinoScore metric.
| Method | SVG-Stack | SVG-Fonts | SVG-Icons | SVG-Emoji | SVG-Diagrams |
|---|---|---|---|---|---|
| AutoTrace | 0.942 | 0.954 | 0.946 | 0.975 | 0.874 |
| Potrace | 0.898 | 0.967 | 0.972 | 0.882 | 0.875 |
| VTracer | 0.954 | 0.964 | 0.940 | 0.981 | 0.882 |
| Im2Vec | 0.692 | 0.733 | 0.754 | 0.732 | - |
| LIVE | 0.934 | 0.956 | 0.959 | 0.969 | 0.870 |
| DiffVG | 0.810 | 0.821 | 0.952 | 0.814 | 0.822 |
| GPT-4-V | 0.852 | 0.842 | 0.848 | 0.850 | - |
| 💫 StarVector-1B | 0.926 | 0.978 | 0.975 | 0.929 | 0.943 |
| 💫 StarVector-8B | 0.966 | 0.982 | 0.984 | 0.981 | 0.959 |
Note: StarVector models will not work for natural images or illustrations, as they have not been trained on those images. They excel in vectorizing icons, logotypes, technical diagrams, graphs, and charts.
As shown in the table above, StarVector-8B achieves the highest performance across all benchmark datasets, demonstrating its effectiveness in generating high-quality SVG code from images. The model's ability to understand and reproduce complex vector graphics makes it particularly valuable for applications requiring precise vectorization of icons, logos, and technical diagrams.
StarVector represents
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.