VPype Extended SVG Processor
Hand-drawn looks, hidden lines, and 26 knobs
- svg_output
VPypeExtendedProcessor is what the plain VPypeProcessor becomes when you decide the basics aren't enough. Same idea - take an SVG, clean it up with the vpype plotting toolchain, hand back a plot-ready SVG - but every feature has its own toggle, and it adds three genuinely different effects the simple version can't do at all: squiggles, relooping, and hidden-line removal. If you want your AI image to plot like it was drawn by a slightly anxious human hand instead of a laser, this is the node.
It's part of the same boardmain/ComfyUI-Svg2Gcode pack as the other two, and it sits in the same spot in the pipeline: after your SVG tracer, before the VPypeGCodeGenerator.
How it works
Mechanically it's the same trick as its siblings - it shells out to the vpype executable via subprocess, writes your SVG to a temp file, builds a vpype command, and reads back the result. The difference is the command is assembled conditionally: every stage is only appended when its enable flag is on. So with everything off you get a bare read + write, and each toggle you flip appends the corresponding vpype command. That means the "extended" in the name is mostly control - you can switch off the auto-linemerging that the basic node forces on you, which matters when aggressive merging is eating the detail you actually want.
The inputs that matter
Twenty-six inputs is a lot. Ignore most of them until you need them, and know these groups:
- The hand-drawn look:
squiggles_enable,squiggles_amplitude,squiggles_period- turns straight strokes into wavy ones (amplitude and period in mm). This is the effect people usually come for: it's how you fake a sketchy, organic line.reloop_enable+reloop_tolerancerejoin nearly-closed paths into cleaner loops. - Hidden-line removal:
occult_enable(withoccult_ignore_layers,occult_cross_layers,occult_keep_occulted) - this is where thevpype-occultdependency earns its keep. It hides lines that are behind others, so SVG that looks like a layered or 3D-ified shape plots as clean visible line art instead of spaghetti. - Optimization:
linemerge_enable/linesimplify_enable/linesort_enableare the same clean-up from the basic node, now opt-in.linesort_two_optswitches from nearest-neighbor ordering to the slower, smarter 2-opt travel path - genuinely worth it for dense plots. - Transform:
rotate_angle,skew_x,skew_y,scale_x,scale_y- rotate, skew, and non-uniform scale, all with the default 0/1 so nothing moves unless you move it. - Layout:
layout_enable,layout_width/layout_height(A4 defaults),layout_margin, pluslayout_align/layout_valign(center/left/right and center/top/bottom) andlayout_fit_to_margins- the same fit-to-page behavior as the basic node, but you get to pick the alignment instead of always centering. - The leftovers:
filter_min_length(drop speckles),multipass_count(draw multiple times).
Output is a single svg_output (STRING), ready for VPypeGCodeGenerator.
Installing it
Same install as the rest of the pack. ComfyUI Manager → search "ComfyUI-Svg2Gcode" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/boardmain/ComfyUI-Svg2Gcode
cd ComfyUI-Svg2Gcode
pip install -r requirements.txt
That installs vpype, vpype-occult, and vpype-gcode into ComfyUI's Python environment. The vpype-occult package is the one this node actually needs for the occult feature - if you get an error about a missing occult command, that's what's missing. No model files, nothing for the GPU.
Where people get burned
Two things, and they're both the same theme as the other nodes: since this shells out to vpype, the "vpype executable not found" error shows up whenever the CLI isn't on the PATH of the process that launched ComfyUI (very common on Windows). And with this many toggles it's easy to stack effects and wonder what happened - crank squiggles_amplitude too high and you'll get a wavy explosion, and note that multipass_count only kicks in above 1 here (the basic node uses 0 as off). Start with just the one effect you want, verify the SVG, then add more. This is a small, lightly-maintained pack from a one-person author, so defaults are a suggestion, not a spec - trust a cheap test plot over assumptions.
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| svg_input | STRING | — | |
| linemerge_enable | BOOLEAN | true | — |
| linemerge_tolerance | FLOAT | 0.100–10 | — |
| linesimplify_enable | BOOLEAN | true | — |
| linesimplify_tolerance | FLOAT | 0.050–10 | — |
| reloop_enable | BOOLEAN | false | — |
| reloop_tolerance | FLOAT | 0.050–10 | — |
| squiggles_enable | BOOLEAN | false | — |
| squiggles_amplitude | FLOAT | 0.50–50 | — |
| squiggles_period | FLOAT | 3.00.1–100 | — |
| filter_min_length | FLOAT | 0.00–100 | — |
| occult_enable | BOOLEAN | false | — |
| occult_ignore_layers | BOOLEAN | false | — |
| occult_cross_layers | BOOLEAN | false | — |
| occult_keep_occulted | BOOLEAN | false | — |
| linesort_enable | BOOLEAN | true | — |
| linesort_two_opt | BOOLEAN | false | — |
| multipass_count | INT | 00–50 | — |
| rotate_angle | FLOAT | 0-360–360 | — |
| skew_x | FLOAT | 0-89.9–89.9 | — |
| skew_y | FLOAT | 0-89.9–89.9 | — |
| scale_x | FLOAT | 1.000.01–100 | — |
| scale_y | FLOAT | 1.000.01–100 | — |
| layout_enable | BOOLEAN | true | — |
| layout_width | FLOAT | 21010–5000 | — |
| layout_height | FLOAT | 29710–5000 | — |
| layout_margin | FLOAT | 10.00–100 | — |
| layout_align | COMBO | 3 options: center, left, right | |
| layout_valign | COMBO | 3 options: center, top, bottom | |
| layout_fit_to_margins | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| svg_output | STRING | — |