Nodes/ComfyUI OmniSVG Nodes/πŸ“ OmniSVG Text to SVG
ComfyUI Node

πŸ“ OmniSVG Text to SVG

Type 'a house icon' and actually get SVG code β€” mostly

By A043-studiosΒ·Created about a year agoΒ·Updated about a year agoΒ· 4
πŸ“ OmniSVG Text to SVG
  • omnisvg_model
  • svg_code
  • preview_image
β—„text_promptA simple icon of a house with a red roof and blue doorβ–Ί
β—„temperature0.8β–Ί
β—„top_p0.95β–Ί
β—„top_k50β–Ί
β—„repetition_penalty1.05β–Ί

This is the headline node of the pack and the reason most people install it: describe an icon or simple graphic in plain words and get back real, editable SVG code - not a raster image pretending to be one. That's a genuinely different thing from diffusion output. Vector scales to any size without fuzz, weighs kilobytes, and opens in Inkscape, Figma, or any browser ready to edit. It's the gap services like Recraft fill commercially; OmniSVG is the open-weight attempt, and this node is its ComfyUI wrapper.

How it works

The node builds a Qwen chat message - a system prompt ("You are a multimodal SVG generation assistant...") plus "Task: text-to-svg / Generate SVG code for: <your prompt>" - applies the chat template, and runs the sketch decoder transformer in autoregressive generate mode. The output tokens are decoded into SVG paths and colors by the pack's DeepSVG-style tokenizer, then re-rendered into a PNG preview with CairoSVG. Token-by-token generation, not diffusion: the model is literally writing the code, which is why results look like an AI trying to type SVG rather than an AI painting.

The inputs that matter

  • omnisvg_model - from the OmniSVG Model Loader.
  • text_prompt (multiline, default "A simple icon of a house with a red roof and blue door") - be specific about style. "Minimalist flat icon of a coffee cup with steam" beats "coffee cup". Style words do more work here than they do with a diffusion model.
  • temperature (default 0.8, range 0.1–2), top_p (default 0.95), top_k (default 50) - the standard sampling knobs, and unlike the Image-to-SVG node, these actually do something. Drop temperature to 0.3–0.5 for clean, consistent icons; raise it if you want looser, more exploratory output.
  • repetition_penalty (default 1.05, range 1–2) - leave it alone unless the model starts repeating shapes, then nudge up.

Outputs

  • svg_code (SVG_STRING) - the generated markup. Wire into SVG to Image to rasterize or SVG Saver to write a file.
  • preview_image (IMAGE) - the CairoSVG render, so you can see what happened without a separate rasterizer.

Install and the heavy stuff

Same as the whole pack: ComfyUI Manager (search "OmniSVG") or git clone https://github.com/A043-studios/ComfyUI-OmniSVG into custom_nodes, run python install.py, download the model to ComfyUI/models/omnisvg/OmniSVG-3B, restart. You want 17GB+ VRAM, and the first run also pulls Qwen2.5-VL-3B-Instruct from Hugging Face. Generation isn't instant - a minute or two on a decent GPU is the norm, since the HF demo's queue hovers around two minutes.

The honest part

When OmniSVG's weights landed in mid-2025, the community reaction was a shrug plus "it fails a lot." Simple, rudimentary prompts - a house, a coffee cup, a sun - produce decent flat icons. Anything with real composition, fine detail, or text rendering falls apart fast, and text adherence was called out as atrocious on the model's own showcase examples. Treat this as an icon/logo/pattern generator, not an SVG illustrator. Keep prompts to one subject, state the style, and don't ask for typography.

Troubleshooting: red preview plus "Error:" inside svg_code means generation blew up - check the console, usually VRAM. Gibberish output that technically renders? Lower temperature, simplify the prompt, and try again.

CategoryOmniSVG

Inputs (6)

NameTypeDefaultDescription
omnisvg_modelOMNISVG_MODELβ€”
text_promptSTRINGA simple icon of a house with a red roof and blue doorβ€”
temperatureFLOAT0.80.1–2β€”
top_pFLOAT0.950.1–1β€”
top_kINT501–100β€”
repetition_penaltyFLOAT1.051–2β€”

Outputs (2)

NameTypeDescription
svg_codeSVG_STRINGβ€”
preview_imageIMAGEβ€”