D2 Save Image
Save Image with a gallery, a filename template, and A1111 metadata
- images
- d2_pipe
- popup_image
- filenames
Stock SaveImage is fine until you want a timestamped filename, an animated WebP, or a file that remembers its own generation settings. D2 Save Image is the pack's answer to all three, and it's the node you'll actually leave in your working workflow. Same gallery pop-up as D2 Preview Image, but it writes files, embeds A1111-style generation parameters into the metadata, and lets you template the filename instead of fighting ComfyUI's default counter.
What it does differently
Three things earn it a slot in your default graph. First, filename templating: filename_prefix accepts things like %date:yyyyMMdd-hhmmss% and can pull any parameter from other nodes in the graph. The tooltip spells out the syntax - datetime via %date:{yyyy/MM/dd/hh/mm/ss}%, node parameters via %{Node title}.{key}% or %node:{id}.{key}%. Second, A1111-style metadata: if you feed it a d2_pipe from D2 KSampler, it writes the full prompt/sampler/seed/cfg block into the file's metadata (PNG, JPEG, and WebP). That's what makes D2 Load Image able to read prompts back later - and it means your output files carry their own recipe. Third, format choices: png, jpeg, webp, and animated_webp, with lossless/quality/fps controls. Animated WebP from a batch of images is a party trick that's genuinely useful for showing an XY plot result or a multi-frame generation.
Inputs that matter
images- what to save. Also accepts thed2_pipeso metadata comes along.filename_prefix- the template. Defaults to%date:yyyyMMdd-hhmmss%.preview_only- true means preview without writing a file. It's the same gallery behavior as D2 Preview Image, in the same node. Handy for a "check then commit" flow.format/lossless/quality/fps- the encoding knobs. Quality only applies to jpeg and lossy webp; fps is for animated_webp.popup_image- the full-screen gallery button.
The one output is filenames, a LIST of full paths to what was saved. If you're chaining into anything that needs to know where files landed, that's your hook.
Where people get tripped up
The filename template is the usual suspect. ComfyUI still appends its own _00001_-style counter after your template, so don't try to encode uniqueness into the prefix with a timestamp and then be confused when a counter shows up - that's normal, and the counter is what keeps the files from colliding. Also, preview_only writes to the temp directory, so if you flick it on and then can't find your "saved" images, that's working as designed.
The metadata path is worth understanding: the A1111 parameters only get embedded when the node receives a d2_pipe with the generation settings in it. If you wire this directly off a plain KSampler without a pipe, your files will be metadata-less. Connect D2 KSampler's d2_pipe output here and the parameters come along automatically.
Installing
Part of D2 Nodes ComfyUI:
cd ComfyUI/custom_nodes
git clone https://github.com/da2el-ai/D2-nodes-ComfyUI
or search "D2 Nodes ComfyUI" in ComfyUI Manager. Light deps, no models. Since v32.0.0 the pack needs ComfyUI's V3 schema - pin to an older release on old ComfyUI builds.
If your endgame is Eagle registration as well as a local file, D2 Save Image Eagle is the same node with the Eagle API calls bolted on. This one stays the workhorse for plain, metadata-rich saving.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | %date:yyyyMMdd-hhmmss% | Datetime -- %date:{yyyy/MM/dd/hh/mm/ss}% Node param -- %{Node title}.{key}% Node param -- %node:{id}.{key}% |
| preview_only | BOOLEAN | false | — |
| format | COMBO | 4 options: png, webp, jpeg, animated_webp | |
| lossless | BOOLEAN | true | — |
| quality | INT | 800–100 | — |
| fps | FLOAT | 6.000.01–1000 | — |
| d2_pipeopt | D2_TD2Pipe | — | |
| popup_imageopt | D2_BUTTON | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| filenames | LIST | — |