Nodes/ComfyUI Text Processor/Advanced Image Saver (Aesthetic)
ComfyUI Node

Advanced Image Saver (Aesthetic)

The save node with an aesthetic bouncer at the door

By rookiestar28·Created 10 months ago·Updated 10 days ago· 16
Advanced Image Saver (Aesthetic)
  • images
  • filtered_images
  • files
  • scores
output_path[time(%Y-%m-%d)]
allow_absolute_output_path
filename_prefixComfyUI
filename_delimiter_
filename_number_padding4
filename_number_start
extension
dpi300
quality100
optimize_image
lossless_webp
overwrite_mode
embed_workflow
show_previews
metadata_mode
calculate_aesthetic_score
allow_aesthetic_remote_code
aesthetic_precisionauto
keep_aesthetic_model_loaded
aesthetic_threshold5.0
aesthetic_score

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_path parses [time(%Y-%m-%d)] tokens into real dates, and relative paths stay under ComfyUI's output root. Absolute paths outside output require the explicit allow_absolute_output_path opt-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), and filename_number_start flips between 0001_prefix and prefix_0001. overwrite_mode = prefix_as_filename turns the prefix into a static name.
  • Formats: png, jpg/jpeg (with 1–100 quality and dpi), webp (with a lossless_webp toggle), bmp, tiff.
  • Metadata: metadata_mode full / minimal / none, plus embed_workflow for 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_previews off for headless runs. If you save to an allowed absolute path outside ComfyUI output, the file still appears in files, just not as a clickable preview (ComfyUI's /view only 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.

CategoryComfyUI Text Processor/IO

Inputs (22)

NameTypeDefaultDescription
imagesIMAGEImage batch to save and optionally filter by aesthetic score.
output_pathSTRING[time(%Y-%m-%d)]Output subfolder or, when explicitly allowed, an absolute directory; supports time tokens.
allow_absolute_output_pathCOMBOAllow output_path outside ComfyUI's output root; keep false unless the destination is trusted.
filename_prefixSTRINGComfyUIBase name placed before the generated file number.
filename_delimiterSTRING_Text inserted between the filename prefix and generated number.
filename_number_paddingINT41–9Minimum digit width used for generated file numbers.
filename_number_startCOMBOPlace the generated number before the prefix instead of after it.
extensionCOMBOImage file format used for saved outputs.
dpiINT3001–2400DPI metadata written when supported by the selected format.
qualityINT1001–100Encoder quality for formats that support a quality setting.
optimize_imageCOMBORequest supported encoders to optimize the saved file.
lossless_webpCOMBOUse lossless encoding when extension is webp.
overwrite_modeCOMBOChoose numbered files or overwrite a filename derived from the prefix.
embed_workflowCOMBOEmbed available workflow metadata in supported output formats.
show_previewsCOMBOReturn contained ComfyUI output previews for saved files.
metadata_modeCOMBOSelect how much available generation metadata to write.
calculate_aesthetic_scoreCOMBORun the optional aesthetic model and filter images by the threshold.
allow_aesthetic_remote_codeCOMBOPermit model repository remote code for aesthetic scoring; enable only for a trusted model source.
aesthetic_precisionCOMBOautoDevice and numeric precision policy for the optional aesthetic model.
keep_aesthetic_model_loadedCOMBOKeep the optional aesthetic model in memory between executions.
aesthetic_thresholdFLOAT5.00–10Minimum aesthetic score required for an image to be saved.
aesthetic_scoreoptSTRINGOptional upstream score text used instead of calculating scores locally.

Outputs (3)

NameTypeDescription
filtered_imagesIMAGEImages that passed optional filtering and remain available for downstream nodes.
filesSTRINGSaved file paths.
scoresSTRINGAesthetic scores or score diagnostics for input images.