ComfyUI Node

Aesthetic Select

A ComfyUI node in Zuellni/Aesthetic with 5 inputs and 4 outputs.

By Zuellni·Created 3 years ago·Updated 3 years ago· 43
Aesthetic Select
  • images
  • latents
  • masks
  • models
  • IMAGES
  • LATENTS
  • MASKS
  • SCORES
count1

Tired of generating eight images, saving them all, and squinting at a folder to find the one that isn't garbage? Aesthetic Select is the automatic cherry-picker - it scores every image in a batch against aesthetic classifiers and hands back only the best count. It's the node people actually reach this pack for, and the reason the pack's loader exists at all.

What it is

You generate a batch of images (the classic "grid and pick" workflow that ComfyUI's core nodes make you do by hand), feed it to Select, and it returns the top-ranked tensors plus their scores. Same idea as the old "aesthetic scorer" scripts from the SD 1.5 era, except it runs inside the graph, on images, latents, and masks at once, and keeps them in sync. If you're generating batches for a LoRA training set, picking the best seed for a thumbnail, or just want "generate 8, keep 1" without babysitting the UI, this is the node.

How the scoring works

Give it a models list from Aesthetic Loader, and it runs each classifier pipeline over the batch, maps each classifier's output labels through the weight vector the loader attached, sums the weighted scores per image, and sorts descending. Top count survive. The SCORES output is a comma-separated string like 0.912, 0.887 - useful if you want to log or format them.

Two behaviors worth knowing cold:

  • No models connected → it stops scoring and acts like LatentFromBatch: it returns the single tensor at index count - 1. So count doubles as "pick the Nth image."
  • count = 0 → it raises an interrupt and stops processing for every connected node. That's a deliberate abort switch: you can route a condition into count to cancel a run.

The inputs that matter

| Input | What it does | |---|---| | count | How many winners to keep (0–64). The one you'll actually fiddle with. | | images / latents / masks | At least one of these. Scores are computed from images; latents and masks get reindexed to match the winners. | | models | The MODELS list from Aesthetic Loader. Optional, but without it you get index-picking, not aesthetic picking. |

Outputs are IMAGES, LATENTS, MASKS, and SCORES. Wire the winners wherever you were wiring the full batch.

What to expect

The scoring is fast but not free - each batch frame gets converted to PIL and pushed through one or more ViT classifiers on the CPU side of the transfer. On a batch of 8–16 it's a couple of seconds; nobody's hurting. The scores themselves are relative and honestly arbitrary - "0.912" doesn't mean objectively great, it means this model's "good" class fired hard. Don't over-rotate on the numbers; trust the ranking, not the scale.

One real caveat: the aesthetic classifiers were trained on particular taste. cafe_aesthetic is a general-photography aesthetic score, cafe_waifu is anime-specific, and the age classifier nudges demographics. For a stylized or uncanny workflow they can confidently rank things you'd rank differently. It's a filter, not a critic - you're still the final judge, you're just judging a shortlist instead of a wall of thumbnails.

Installing

From Zuellni/ComfyUI-Custom-Nodes, via ComfyUI Manager (search "Zuellni") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Zuellni/ComfyUI-Custom-Nodes

Restart, and note the pack is archived - the author moved on. The nodes still work fine for this job, but there's no maintenance stream. The first run of Aesthetic Loader downloads the classifiers, so your first pick will take a moment; after that it's cached.

CategoryZuellni/Aesthetic

Inputs (5)

NameTypeDefaultDescription
countINT10–64
imagesoptIMAGE
latentsoptLATENT
masksoptMASK
modelsoptLIST

Outputs (4)

NameTypeDescription
IMAGESIMAGE
LATENTSLATENT
MASKSMASK
SCORESSTRING