ComfyUI Node

SVG Save

Write SVG text to disk — the export step

By orion4d·Created about a year ago·Updated 12 months ago· 11
SVG Save
  • svg_text
  • path
directoryoutput/svg
filenameshape.svg
timestamp_suffixtrue

SVG Save is the sink at the end of the SVG lane: it takes SVG_TEXT and writes it to an actual .svg file on disk. Every SVG workflow in ComfyUI_DAO_master that ends in a file - a styled logo, a booleaned shape, a converted DXF - runs through this node. It's the least glamorous node in the pack and also the one you can't skip if you want the file at the end.

How it works

Dead simple under the hood: take the SVG text, make sure the target directory exists, and write it out with UTF-8 encoding. Two behaviors worth knowing, both shared with the pack's DXF Save:

  • timestamp_suffix defaults to on. Each run writes a new file like shape_20260816_143022.svg instead of clobbering the previous one. Great for iteration, terrible if you want a stable filename for another tool to pick up.
  • Anti-overwrite. Even with the suffix off, an existing file gets _1, _2 appended. Your work is never silently overwritten.

Inputs and outputs

Inputs: svg_text (the content to save), directory (default output/svg, relative to ComfyUI's working directory → ComfyUI/output/svg), filename (default shape.svg), and timestamp_suffix.

Output: a single path - the absolute path of the written file. There's no save_file toggle here like DXF Save has, so if the SVG text is empty the node writes nothing and returns "" rather than creating junk files.

Why you'd use it

Obvious, but worth saying: SVG is a text format, so this node is also the most natural "look at what your workflow actually built" debug tool. Wire the same svg_text into SVG Save and a Show Text node, and you can read exactly what your style or boolean nodes produced while also saving it.

How to install

Part of the orion4d/ComfyUI_DAO_master pack:

cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/ComfyUI_DAO_master.git
pip install -r requirements.txt

Restart ComfyUI. No models.

Common issues

"Where did it go?" is the eternal question - the path output is absolute, so wire it into a text display to see the exact location. If you keep finding dozens of timestamped files you didn't want, flip timestamp_suffix off and get a stable filename. And if you're feeding the output to an external tool, remember the file is whatever text you handed in - garbage in, garbage out. The node doesn't validate the SVG; it just writes it.

CategoryDAO_master/SVG/IO

Inputs (4)

NameTypeDefaultDescription
svg_textSVG_TEXT
directorySTRINGoutput/svg
filenameSTRINGshape.svg
timestamp_suffixBOOLEANtrue

Outputs (1)

NameTypeDescription
pathSTRING