DP Save Image V2
Save images with real filenames, formats, and captions
- image
ComfyUI's built-in Save Image node is fine for casual use and genuinely annoying the moment you need anything beyond it - it writes PNG, names files with a counter, and that's about it. DP Save Image V2 covers the gaps: a real filename you control, a format choice beyond PNG, a folder you name yourself, and - the feature that makes this worth knowing about specifically - an optional caption file saved alongside the image.
How it works
folder_name and file_name give you actual control over where things land and what they're called, instead of ComfyUI's default counter-based naming. image_format lets you save PNG, JPG, JPEG, or WEBP directly from this one node, rather than needing a separate converter node for anything but PNG. mode toggles between SAVE_IMAGE (writes to disk) and PREVIEW_ONLY (shows the result without saving) - handy for flipping a save node to a scratch preview while you're iterating, without deleting and re-adding a node.
The part worth calling out specifically: save_caption. Turn it on and, alongside the image file, the node writes a text caption using whatever you feed into prompt_and_caption_text (and optionally negative_or_other). That's the exact image-plus-matching-text-file pairing that LoRA training tools expect - captioning by hand or with a captioner and keeping a .txt next to each image is still the standard workflow for building a training dataset. If you're generating synthetic training images and want them export-ready for a LoRA trainer without a separate captioning pass afterward, this is the node doing double duty.
Inputs and outputs
Required:
mode-SAVE_IMAGE(default) orPREVIEW_ONLY.image- what you're saving.folder_name(defaultdp_image_folder) /file_name(defaultimage) - where it goes and what it's called.extra_text(default empty) - appended to the filename.add_size_to_name(boolean, default off) - append the image dimensions to the filename.save_caption(boolean, default off) - write a matching text caption alongside the image.image_format-PNG(default),JPG,JPEG, orWEBP.
Optional:
prompt_and_caption_text/negative_or_other(default empty) - the caption content, used whensave_captionis on.format_override(default empty) - override the chosen format on a per-run basis.
No data outputs - this is a terminal node (is_output_node: true), it writes to disk and that's the effect.
Installing it
ComfyUI Manager: search ComfyUI-Desert-Pixel-Nodes, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes
Restart ComfyUI - no extra models, just image I/O.
Where people get tripped up
PREVIEW_ONLY is easy to leave on by accident after a debugging session and then wonder why a batch you ran produced no files - check mode first if your output folder is emptier than expected.
add_size_to_name and extra_text both modify the filename, and if you're relying on file_name alone to be exactly reproducible run to run (for matching against an external caption list, say), stacking those options in will change the actual filename on disk - know what's turned on before you build automation around exact filenames.
And if you turn on save_caption expecting a caption to just appear, remember it's a passthrough, not a generator - this node writes whatever text you feed into prompt_and_caption_text, it doesn't invent a caption from the image. You still need something upstream producing that text, whether that's your own prompt string or a captioning model's output.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | SAVE_IMAGE | 2 options: SAVE_IMAGE, PREVIEW_ONLY |
| image | IMAGE | — | |
| folder_name | STRING | dp_image_folder | — |
| file_name | STRING | image | — |
| extra_text | STRING | — | |
| add_size_to_name | BOOLEAN | false | — |
| save_caption | BOOLEAN | false | — |
| image_format | COMBO | PNG | 4 options: PNG, JPG, JPEG, WEBP |
| prompt_and_caption_textopt | STRING | — | |
| negative_or_otheropt | STRING | — | |
| format_overrideopt | STRING | — |
Outputs (0)
No outputs