ComfyUI-ToSVG
This project converts raster images into SVG format using the a/VTracer library. It's a handy tool for designers and developers who need to work with vector graphics programmatically.
Nodes (15)
You found the old name — this node is now TS_ImageToSVGStringBW_Vtracer
Where this pack actually gets interesting
Put your SVG back into the pixel pipeline
Still the way to get SVG onto disk
See your SVG without leaving ComfyUI
The silent partner that makes every vector trace come out clean
Potrace, the engine behind decades of vector logos
The node that turns your AI images into actual vector files
Trace a full-color image into layered SVG, one node at a time
Write an SVG string to disk, that's the whole job
Unwrap an SVG object back into plain text
Shrink a bloated SVG without redrawing it
Look at your trace before you commit to saving it
Rasterize an SVG string back into a ComfyUI image
Wrap an SVG string into the core SVG type for ComfyUI's own nodes
ComfyUI-ToSVG
Huge thanks to visioncortex and potracer for this amazing thing! Original repository: https://github.com/visioncortex/vtracer and https://github.com/tatarize/potrace

Update
06-17
- This update is a destructive update. Please check carefully in the production environment!
- Rename nodes to avoid conflicts
- Add new nodes
Image QuantizeSVG String to SVG BytesIOSVG BytesIO to SVG StringSVG String Path SimplifyImage to SVG String BW_Potracer(thanks@ImagineerNL, Optimized integration based on his work)
VTracer ComfyUI Non-Official Implementation
Welcome to the unofficial implementation of the ComfyUI for VTracer. This project converts raster images into SVG format using the VTracer library. It's a handy tool for designers and developers who need to work with vector graphics programmatically.
Installation
- Navigate to your
/ComfyUI/custom_nodes/folder. - Run the following command to clone the repository:
git clone https://github.com/Yanick112/ComfyUI-ToSVG/
- Navigate to your
ComfyUI-ToSVGfolder.
- For Portable/venv:
- Run the following command:
path/to/ComfUI/python_embeded/python.exe -s -m pip install -r requirements.txt - With system Python:
- Run the following command:
pip install -r requirements.txt
Enjoy setting up your ComfyUI-ToSVG tool! If you encounter any issues or need further help, feel free to reach out.
Partial Parameter Description
- Filter Speckle (Cleaner)
- Color Precision (More accurate)
- Gradient Step (Less layers)
- Corner Threshold (Smoother)
- Segment Length (More coarse)
- Splice Threshold (Less accurate)
Features
-
Converts images to RGBA format if necessary
-
Support batch conversion
-
node
ConvertRasterToVectorto handle the conversion of raster images to SVG format with various parameters for customization. -
node
SaveSVGto save the resulting SVG data into files.
What's next?
- [x] Add SVG preview node
- [x] Color and BW mode split
Enjoy converting your raster images to SVG with this handy tool! If you have any questions or need further assistance, don't hesitate to reach out.