ComfyUI Node

vtracer

The classic raster-to-vector tracer, now a ComfyUI node

By civitai·Created 3 months ago·Updated 2 days ago· 44
vtracer
  • image
  • api_config
  • svg_audio
  • svg_video
  • workflow_id
  • raw_json
hierarchicalstacked
modespline
filter_speckle8
color_precision6
layer_difference24
corner_threshold65
length_threshold5.00
max_iterations10
splice_threshold50
path_precision2

VTracer is the old reliable of vectorization - the open-source algorithmic tracer (the engine behind vectorizer.ai's free tool) that converts raster pixels into clean geometric SVG paths. It's the opposite of the generative OmniSVG/StarVector nodes in this pack: no model, no sampling, just deterministic geometry. Feed it a logo or illustration, get a faithful, infinitely-scalable vector back.

This node runs VTracer on Civitai's orchestration layer, which is arguably the least necessary of the three image-to-SVG options - VTracer is a tiny, dependency-light algorithm that runs fine on a laptop in seconds. You're paying Buzz to have Civitai run something you could trivially run locally. But if you're already in a ComfyUI graph and want the result as a node output without leaving the canvas, or you're on a no-GPU cloud ComfyUI where running your own tracer is friction, here it is. It's also the one with the most knobs, because it's a real tuning problem.

How it works

Standard civitai-comfy-nodes mechanics: upload your image as an imageToSvg recipe (engine comfy, ecosystem vtracer), long-poll, return the SVG. VTracer's parameters control the tracing quality - color segmentation, path smoothing, and simplification - and they map 1:1 from the classic VTracer CLI.

The inputs that matter

Only image is required; the defaults are sane, but these are the ones worth touching:

  • mode - spline (default, smooth curves), polygon (angular, good for geometric art), or none (raw paths).
  • filter_speckle - drops tiny noise shapes; raise it to suppress speckle on noisy scans.
  • color_precision - how many colors to preserve (default 6); lower = more posterized, higher = more faithful.
  • layer_difference - how different two colors must be to split into separate layers (default 24). Lower it to keep similar shades together.
  • corner_threshold / length_threshold - corner detection and path-simplification sensitivity; the main levers for "too many points" vs "losing detail."
  • hierarchical - stacked (default) or cutout layers.
  • max_iterations, splice_threshold, path_precision - advanced; leave them alone until you're chasing a specific artifact.

Outputs

Same generated naming as the SVG siblings: svg_audio / svg_video media slots plus workflow_id / raw_json. The SVG comes back in a media slot (the names are a pack codegen artifact - don't take "audio"/"video" literally); raw_json holds the full job JSON if you need the raw SVG text.

Installing and authenticating

Pack-wide install:

cd ComfyUI/custom_nodes
git clone https://github.com/civitai/civitai-comfy-nodes.git
pip install -r civitai-comfy-nodes/requirements.txt

or ComfyUI Manager → "Civitai Comfy Nodes" → Install → restart. Dependencies: requests + python-socketio[client].

Auth: Civitai Auth node → CIVITAI_API_TOKEN → stored key/OAuth → browser login. Headless:

export CIVITAI_API_TOKEN=your_token

Where people get burned

  • You're paying for something trivial to run locally. VTracer is a laptop algorithm. If you have any local Python at all, running it yourself is free and faster. This node earns its Buzz only when you're deep in a ComfyUI workflow or on a no-GPU box.
  • Tuning is a rabbit hole. Speckle, color precision, and the two thresholds interact - change one, re-check, iterate. Start with filter_speckle and color_precision, and only touch the thresholds if paths come out spiky.
  • It's a trace, not a semantic generation. Text and gradients trace poorly; VTracer shines on flat-color logos and illustrations, not photos.
  • Odd output names (svg_audio/svg_video) are generated naming - don't expect audio. And the image is sent to Civitai's servers for processing.
CategoryCivitai/Image/vtracer

Inputs (12)

NameTypeDefaultDescription
imageIMAGEEither A URL, A DataURL or a Base64 string
hierarchicaloptCOMBOstacked2 options: stacked, cutout
modeoptCOMBOspline3 options: spline, polygon, none
filter_speckleoptINT80–100
color_precisionoptINT60–10
layer_differenceoptINT240–256
corner_thresholdoptINT650–180
length_thresholdoptFLOAT5.003.5–10
max_iterationsoptINT101–70
splice_thresholdoptINT500–180
path_precisionoptINT20–10
api_configoptCIVITAI_CONFIGOptional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login.

Outputs (4)

NameTypeDescription
svg_audioAUDIO
svg_videoVIDEO
workflow_idSTRING
raw_jsonSTRING