πΌοΈ OmniSVG Image to SVG
Turn a logo into a real SVG β leave your photos out of it
- omnisvg_model
- image
- svg_code
- preview_image
You've got a PNG of a logo, an icon, a sticker - and what you actually need is a vector file. Something that scales to a billboard without going fuzzy, that opens in Inkscape or Figma, that you can ungroup and edit. Diffusion models can't hand you that; they only ever produce pixels. This node is the pack's answer: feed it your raster image, and it returns genuine SVG code plus a raster preview.
Now the expectation-setting, because it matters. OmniSVG is a 3B vision-language model fine-tuned mostly on icons and simple graphics, and this node is only as good as that model. Give it a flat logo, a high-contrast emblem, a black-and-white mark, and you'll get something usable. Feed it a photograph and you'll get an abstraction that's usually mush. That's the model doing its thing, not a settings problem you can tune away.
How it works
Your ComfyUI IMAGE tensor becomes a PIL image, gets resized to a square at target_size, and is written to a temp PNG. That file goes to the Qwen2.5-VL processor as a vision input, and the sketch decoder generates output autoregressively - DeepSVG-style path and color tokens, one at a time. The tokenizer turns those tokens into SVG paths, colors get applied, and CairoSVG renders the preview. This is token generation, not diffusion: the model is effectively writing SVG code about what it sees.
The inputs that matter
- omnisvg_model - wire it from the OmniSVG Model Loader.
- image - any IMAGE, e.g. from Load Image.
- target_size (default 200, range 64β512) - the input is stretched to a square at this resolution before the model sees it. Smaller means simpler, cleaner shapes and faster generation; 200β400 is the sweet spot for logos.
- temperature / top_p / top_k / repetition_penalty - honest note: in this pack's code, image-to-SVG generation hardcodes temp 0.1, top_p 0.001, top_k 1, repetition penalty 1.05 and ignores these sliders for the image task. They're in the UI, but don't expect them to change much here. The same sliders on the Text-to-SVG node actually do work.
Outputs
- svg_code (SVG_STRING) - the real SVG markup. Wire it into SVG to Image or SVG Saver.
- preview_image (IMAGE) - a raster preview, so you can hook up a Save Image node and skip all this if you only wanted pixels anyway.
Install
Same story as the rest of the pack - this isn't the heavy part, the model is. ComfyUI Manager, search "OmniSVG", or:
cd ComfyUI/custom_nodes
git clone https://github.com/A043-studios/ComfyUI-OmniSVG
cd ComfyUI-OmniSVG
python install.py
Then download the model to ComfyUI/models/omnisvg/OmniSVG-3B and restart. Requirements pull in transformers, qwen-vl-utils, accelerate, and cairosvg, and you'll want 17GB+ VRAM. Full model details live in the OmniSVG Model Loader article.
Where people get burned
- Photos and complex scenes produce weak output. Use flat, high-contrast input; the pack's own examples README says black-and-white images convert cleanest.
- VRAM. Under ~17GB you'll hit CUDA out of memory. Process one image at a time.
- Red preview + "Error:" in svg_code means generation failed - check the console, usually it's memory.
- Temper expectations on quality. When the OmniSVG weights landed in mid-2025, community testing was blunt: one tester reported roughly 1 in 10 image-to-SVG results being decent. Simple in, simple out. Treat this as an icon-tracer, not a photo-vectorizer.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| omnisvg_model | OMNISVG_MODEL | β | |
| image | IMAGE | β | |
| target_size | INT | 20064β512 | β |
| temperature | FLOAT | 0.100.01β1 | β |
| top_p | FLOAT | 0.0010.001β1 | β |
| top_k | INT | 11β100 | β |
| repetition_penalty | FLOAT | 1.051β2 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| svg_code | SVG_STRING | β |
| preview_image | IMAGE | β |