Advanced Image Saver (Aesthetic)
The save node with an aesthetic bouncer at the door
- images
- filtered_images
- files
- scores
ComfyUI's built-in Save Image is fine for the happy path: PNG, numbered, into the output folder. Advanced Image Saver is for when you want the save step to do actual work - filter out the bad generations before they touch disk, pick JPEG vs WebP per run, write into date-stamped folders, and keep metadata you can read back.
The headline feature is the aesthetic filter. Turn on calculate_aesthetic_score, and every image gets scored by the Aesthetic Predictor V2.5 model; anything below aesthetic_threshold never gets saved. That's a "keep the keeper, skip the 200 misfires" button for unattended batch runs. It's optional and off by default - you have to both install the model (pip install aesthetic-predictor-v2-5) and explicitly allow its remote code, which is the right level of friction for something that loads a model into your process. If you'd rather supply scores from elsewhere (say, a separate scoring node), the optional aesthetic_score input lets you do that without loading the built-in predictor at all.
How it works
- Path:
output_pathparses[time(%Y-%m-%d)]tokens into real dates, and relative paths stay under ComfyUI's output root. Absolute paths outside output require the explicitallow_absolute_output_pathopt-in - a sensible guard, given how easy it is to point a save node somewhere you regret. - Filenames:
filename_prefix,filename_delimiter,filename_number_padding(0001 vs 1), andfilename_number_startflips between0001_prefixandprefix_0001.overwrite_mode = prefix_as_filenameturns the prefix into a static name. - Formats: png, jpg/jpeg (with 1–100
qualityanddpi), webp (with alossless_webptoggle), bmp, tiff. - Metadata:
metadata_modefull / minimal / none, plusembed_workflowfor ComfyUI-restorable graph data. The honest caveat the README gives you: JPEG metadata support is limited - if you need to read metadata back later, use PNG or WebP. - Previews:
show_previewsoff for headless runs. If you save to an allowed absolute path outside ComfyUI output, the file still appears infiles, just not as a clickable preview (ComfyUI's/viewonly serves host-managed paths).
Inputs and outputs
The ones you'll set: images, output_path, extension, quality, filename_prefix, and (if you use the filter) calculate_aesthetic_score + aesthetic_threshold. The default threshold is 5 on a 0–10 scale - start there and tune.
Three outputs: filtered_images (images that passed, ready for downstream nodes), files (the saved paths - wire into a text/log node), and scores (per-image aesthetic scores or diagnostics).
Install
The pack plus one optional extra:
cd ComfyUI/custom_nodes
git clone https://github.com/rookiestar28/ComfyUI_Text_Processor.git
pip install -r requirements.txt
# only if you want built-in aesthetic scoring:
pip install aesthetic-predictor-v2-5
Restart after. Manager users: search "ComfyUI Text Processor".
Gotchas
The aesthetic model needs allow_aesthetic_remote_code enabled before it'll load - that's a deliberate trust gate, and it's disabled by default. aesthetic_precision defaults to auto, which picks the best supported device/precision and falls back; if it's misbehaving on a weird setup, cpu_fp32 is the safe choice. And remember: calculate_aesthetic_score off means no filtering - the threshold does nothing. It's a lot of knobs, but the core loop - path, format, filter - is set in three clicks.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Image batch to save and optionally filter by aesthetic score. | |
| output_path | STRING | [time(%Y-%m-%d)] | Output subfolder or, when explicitly allowed, an absolute directory; supports time tokens. |
| allow_absolute_output_path | COMBO | Allow output_path outside ComfyUI's output root; keep false unless the destination is trusted. | |
| filename_prefix | STRING | ComfyUI | Base name placed before the generated file number. |
| filename_delimiter | STRING | _ | Text inserted between the filename prefix and generated number. |
| filename_number_padding | INT | 41–9 | Minimum digit width used for generated file numbers. |
| filename_number_start | COMBO | Place the generated number before the prefix instead of after it. | |
| extension | COMBO | Image file format used for saved outputs. | |
| dpi | INT | 3001–2400 | DPI metadata written when supported by the selected format. |
| quality | INT | 1001–100 | Encoder quality for formats that support a quality setting. |
| optimize_image | COMBO | Request supported encoders to optimize the saved file. | |
| lossless_webp | COMBO | Use lossless encoding when extension is webp. | |
| overwrite_mode | COMBO | Choose numbered files or overwrite a filename derived from the prefix. | |
| embed_workflow | COMBO | Embed available workflow metadata in supported output formats. | |
| show_previews | COMBO | Return contained ComfyUI output previews for saved files. | |
| metadata_mode | COMBO | Select how much available generation metadata to write. | |
| calculate_aesthetic_score | COMBO | Run the optional aesthetic model and filter images by the threshold. | |
| allow_aesthetic_remote_code | COMBO | Permit model repository remote code for aesthetic scoring; enable only for a trusted model source. | |
| aesthetic_precision | COMBO | auto | Device and numeric precision policy for the optional aesthetic model. |
| keep_aesthetic_model_loaded | COMBO | Keep the optional aesthetic model in memory between executions. | |
| aesthetic_threshold | FLOAT | 5.00–10 | Minimum aesthetic score required for an image to be saved. |
| aesthetic_scoreopt | STRING | Optional upstream score text used instead of calculating scores locally. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| filtered_images | IMAGE | Images that passed optional filtering and remain available for downstream nodes. |
| files | STRING | Saved file paths. |
| scores | STRING | Aesthetic scores or score diagnostics for input images. |