π OmniSVG Text to SVG
Type 'a house icon' and actually get SVG code β mostly
- omnisvg_model
- svg_code
- preview_image
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.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| omnisvg_model | OMNISVG_MODEL | β | |
| text_prompt | STRING | A simple icon of a house with a red roof and blue door | β |
| temperature | FLOAT | 0.80.1β2 | β |
| top_p | FLOAT | 0.950.1β1 | β |
| top_k | INT | 501β100 | β |
| repetition_penalty | FLOAT | 1.051β2 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| svg_code | SVG_STRING | β |
| preview_image | IMAGE | β |