Raster to Vector (SVG)BW
You found the old name — this node is now TS_ImageToSVGStringBW_Vtracer
- image
- STRING
Here's the deal: ConvertRasterToVectorBW no longer exists. The ComfyUI-ToSVG pack renamed it to TS_ImageToSVGStringBW_Vtracer in its June 17 update, and the current source only ships the TS_* name. If you're reading this because an old workflow or tutorial pointed you here, the thing you actually want is the new class - same inputs, same behavior, same category. The comfy.icu page keeps tracking this name because people still search it, which tells you how many stale workflows are floating around.
So this article is short, and that's fine: everything below is what the node did under its old name.
What it did
This was the black-and-white raster-to-vector converter of the pack, powered by visioncortex/vtracer. You fed it an IMAGE tensor, it traced the bitmap into paths, and it returned the result as SVG text. Black-and-white here means two-tone output - the tracer decides for every pixel whether it's shape or background, no color layers. That's the right tool for line art, logos, stencils, engraving, and anything destined for a laser or plotter.
The inputs and output
The signature is identical to the current TS_ImageToSVGStringBW_Vtracer:
- image - any IMAGE tensor.
- mode -
spline,polygon, ornone. Spline is the smooth default. - filter_speckle - the "cleaner" dial; higher removes noise specks.
- corner_threshold - the "smoother" dial; the one you'll actually tune when edges come out jagged.
- length_threshold - higher means more coarse segments.
- splice_threshold - lower is more accurate, at the cost of bigger output.
Output is a STRING (a list when you feed a batch of images). Wire it into TS_SVGStringPreview or TS_SVGStringToImage to see the result, or TS_SaveSVGString to write the .svg file.
What to do if you're stuck on this name
Two options, in order of preference:
- In your workflow, swap the node for
TS_ImageToSVGStringBW_Vtracer(or grab a fresh copy of the pack - Manager installs the current code, which only knows the new name). - If you're loading an old saved workflow and ComfyUI reports
ConvertRasterToVectorBWas missing, that's why. Rename the node in the workflow JSON, or rebuild the little section by hand - it's one node, five sliders.
Installing the pack
Same story as every node in the pack. ComfyUI Manager → search ComfyUI-ToSVG → Install → restart, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Yanick112/ComfyUI-ToSVG/
cd ComfyUI-ToSVG
pip install -r requirements.txt # or your portable python_embedded.exe
Dependencies: vtracer, numpy, Pillow, torch, PyMuPDF, potracer. No models, no API keys, all local on CPU. If you hit a fitz import error after an update, that's the PyMuPDF dependency fighting with another pack in the same environment - reinstall it and you're usually fine.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mode | COMBO | spline | 3 options: spline, polygon, none |
| filter_speckle | INT | 40–100 | — |
| corner_threshold | INT | 600–180 | — |
| length_threshold | FLOAT | 4.00–10 | — |
| splice_threshold | INT | 450–180 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |