Vector
The easiest raster-to-SVG node in ComfyUI
- image
- vector_image
So you've got a gorgeous sticker, logo, or flat-illustration render sitting in your ComfyUI graph, and you need it as an actual SVG - scalable, editable in Illustrator or Inkscape, laser-cutter ready. That's exactly what this node does. The Vector node is a thin ComfyUI wrapper around vtracer, the open-source Rust raster-to-vector tracer, and it's about as plug-and-play as these things get. It's not AI - no model files, no inference, no API key. It's a smart bit of post-processing that turns pixels into bezier paths in a couple of seconds.
The pack is a fork of archifancy's original Image-vector-for-ComfyUI, re-released by Cyber-BlackCat with more hand-holding in the README. For a node like this that's honestly the main difference, and for a beginner it matters.
How it works
Wire any IMAGE into the image input, hit queue, and behind the scenes the node: saves your image to a temp PNG, runs vtracer.convert_image_to_svg_py() to trace it into an SVG file on disk, then uses ImageMagick (via the Wand Python binding) to render that SVG back to a PNG and return it as the vector_image output. So the actual vector result is the .svg file written to disk - the image output is just a rasterized preview so you can see what the trace did, wire it to a preview node, and iterate.
That last point is the one that trips people up, so read it twice: the output is a PNG render, the SVG is the file on disk. No SVG comes out of the node's output socket, which is normal for this whole category of node.
The inputs that actually matter
There are twelve knobs, but they're all straight vtracer parameters, and the defaults are sensible. You'll really touch these:
colormode-color(default) for full-color traces,binaryfor a clean black/white two-tone output. Pickbinaryfor silhouettes, stencils, and logos.hierarchical-stacked(default) builds colors as stacked layers;cutoutgenerates real cutout shapes. For laser cutting,cutoutis often what you want.mode-spline(default) gives smooth bezier curves;polygonuses straight line segments (a chunky, geometric look);noneskips curve fitting.filter_speckle- removes tiny enclosed noise regions smaller than N pixels. The #1 fix for "my trace has a million specks of dust."color_precision- higher = more accurate color separation, at the cost of bigger files.
The rest - layer_difference, corner_threshold, length_threshold, max_iterations, splice_threshold, path_precision - are fine at defaults until you get nerdy about path quality. Tweak them only after the trace looks wrong.
And then there's output_directory. Set this. If you leave it blank the SVG lands in your system temp folder under a random name, which is the ComfyUI equivalent of dropping your homework down a well. Point it at any folder, like C:\my-svgs or ~/Desktop/svg_out, and your .svg (plus a rendered .png alongside it) shows up there after every queue run.
Installing it
Through ComfyUI Manager, search for ComfyUI-Image-Vector and install. Or, the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/Cyber-BlackCat/ComfyUI-Image-Vector
cd ComfyUI-Image-Vector
pip install -r requirements.txt
Here's the trap hiding in the requirements file: it lists vtracer, Wand, Pillow, torch, numpy - and then, in a comment, admits ImageMagick itself can't be pip-installed. Wand is only a Python wrapper; it needs the actual ImageMagick binary on your system or the SVG→PNG step throws a DelegateError. On Debian/Ubuntu:
sudo apt-get update && sudo apt-get install -y imagemagick libmagickwand-dev
On Windows you run the ImageMagick installer. And if you're on ComfyUI portable, install the Python deps with python_embeded\python.exe -m pip install -r requirements.txt from inside that folder - your system pip won't touch the portable environment. Then restart ComfyUI.
Troubleshooting
- The node returns
Noneand you're staring at a disconnected output. The node swallows exceptions and prints the error to the console (in Chinese, starting with错误:). Open the console before you rage-click - that's your error message. DelegateError/ "no decode delegate" - ImageMagick isn't installed orWandcan't find it. Go back to the install section.- The SVG you find is named something like
tmpabc123.svg. Working as intended; that's the temp-file basename. You control the folder viaoutput_directory, not the name.
Is it the most powerful tracer on earth? No - real vector artisans will outgrow it for Potrace or a manual redraw. But for the 90% case - turning a clean AI illustration into a usable SVG in under ten seconds - it's the node you reach for.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| colormode | COMBO | color | 2 options: color, binary |
| hierarchical | COMBO | stacked | 2 options: stacked, cutout |
| mode | COMBO | spline | 3 options: spline, polygon, none |
| filter_speckle | INT | 41–128 | — |
| color_precision | INT | 61–10 | — |
| layer_difference | INT | 161–20 | — |
| corner_threshold | INT | 601–100 | — |
| length_threshold | FLOAT | 4.03.5–10 | — |
| max_iterations | INT | 101–20 | — |
| splice_threshold | INT | 451–100 | — |
| path_precision | INT | 81–10 | — |
| output_directory | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| vector_image | IMAGE | — |