Eric Save True SVG Image (with Metadata)
Saving Real Vector SVG From ComfyUI (With the Metadata That Goes With It)
- saved_path
Most "SVG" nodes in ComfyUI lie: they rasterize an image and wrap it in an SVG tag, so you get a vector file that's really just a PNG in a costume. Eric Save True SVG Image is not that. It takes actual SVG content - a string of real vector markup - writes it to disk, and embeds metadata straight into the file's XML. Scalable forever, readable by Inkscape, and still carrying your generation info. If that sounds niche, it is. But if you're producing word clouds, plots, or anything genuinely vector-shaped, it's the node that gets them out of ComfyUI properly.
The required inputs tell the story: svg_content (a string; it's marked as force-input, so wire it from somewhere - the obvious companion is this same pack's word cloud node's svg_export output) and filename_prefix (defaults to wordcloud_svg, which is a hint about who this node was written for). The whole metadata stack from the pack's bigger save node is here: title, description, creator, copyright, keywords, and custom_metadata (a JSON string) all get embedded into the SVG's Dublin Core block when save_embedded is on. enable_metadata is the master kill switch.
There are two honest catches. First, PNG's magic trick - embedding the whole workflow so you can drag the image back into ComfyUI and rebuild the graph - doesn't work in SVG. The node gets around it with save_workflow_as_json, which writes the workflow as a separate .json file. Leave that on if you want reproducibility. Second, some of the fancier toggles are more cosmetic than they sound: svg_optimize strips whitespace, svg_embed_fonts records font info as metadata (it doesn't actually embed font files), and color_profile/bit_depth are stored as reference metadata rather than changing vector rendering. None of that is a bug - it's just knowing which switches move the needle.
File naming follows the pack's usual options: include_project, include_datetime, a filename_format choice between padded zeros and simple numbering, and custom_output_directory with an output_path_mode toggle for absolute paths versus subfolders under the output directory. Output is a single saved_path string telling you where the file landed.
One warning: the source pack is a one-author project with no real community footprint, and this node exists to serve that pack's own vector output. It'll happily save any SVG string you throw at it, but it's not a general-purpose vector pipeline - there's no raster-to-vector tracing here (that'd need something like VTracer, which is an optional, commented-out dependency in the requirements). Feed it real SVG content and it shines; expect magic and you'll be disappointed.
Install via ComfyUI Manager (search AAA Metadata System) or the usual clone:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/AAA_Metadata_System
cd AAA_Metadata_System
pip install -r requirements.txt
Restart, wire your SVG string into svg_content, and you've got a genuinely vector file with its workflow parked beside it. For a niche, it works.
Inputs (25)
| Name | Type | Default | Description |
|---|---|---|---|
| svg_content | STRING | Native SVG content as string | |
| filename_prefix | STRING | wordcloud_svg | Base name for saved files |
| include_projectopt | BOOLEAN | false | Add project name to filename |
| include_datetimeopt | BOOLEAN | true | Add date and time to filename |
| custom_output_directoryopt | STRING | Override the default output location. For relative paths, use 'subfolder' format. Leave empty to use default output folder. | |
| output_path_modeopt | COMBO | Subfolder in Output | How to interpret the custom output directory |
| filename_formatopt | COMBO | Default (padded zeros) | How to format sequential filenames |
| enable_metadataopt | BOOLEAN | true | Master switch to enable/disable all metadata writing |
| titleopt | STRING | SVG title | |
| projectopt | STRING | Project name for organization | |
| descriptionopt | STRING | SVG description/caption | |
| creatoropt | STRING | Creator/artist name | |
| copyrightopt | STRING | Copyright information | |
| keywordsopt | STRING | Comma-separated keywords/tags | |
| custom_metadataopt | STRING | {} | Custom metadata in JSON format |
| save_embeddedopt | BOOLEAN | true | Embed metadata directly in the SVG file |
| save_workflow_as_jsonopt | BOOLEAN | true | Save workflow data as a separate JSON file (required for ComfyUI workflow loading) |
| save_workflow_as_txtopt | BOOLEAN | false | Save workflow data as a separate text file |
| save_xmpopt | BOOLEAN | false | Save XMP sidecar file with metadata |
| save_to_dbopt | BOOLEAN | false | Save metadata to database |
| svg_optimizeopt | BOOLEAN | false | Basic SVG optimization (remove unnecessary whitespace) |
| svg_embed_fontsopt | BOOLEAN | false | Attempt to embed font information as metadata |
| color_profileopt | COMBO | sRGB v4 Appearance | Color profile to embed as metadata (for reference when converting SVG) |
| bit_depthopt | COMBO | 8-bit | Bit depth for metadata reference (actual SVG is vector format) |
| debug_loggingopt | BOOLEAN | false | Enable detailed debug logging |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| saved_path | STRING | — |