Nodes/ComfyUI-LexTools/AgeClassifierNode
ComfyUI Node

AgeClassifierNode

Asks how old the person in the image looks — the awkward way

By SOELexicon·Created 3 years ago·Updated about a year ago· 33
AgeClassifierNode
  • image
  • STRING

AgeClassifierNode looks at an image, spots a person, and returns the most likely age ranges for them - as text, with probabilities. It's one of those classifiers that's a fun demo and a genuinely practical gatekeeper if you're building content-safety checks, and a source of comedy if you feed it AI-generated faces, which are notoriously bad at holding a consistent age.

It works the way you'd hope from the name: feed it an image, get back a string listing the top five predicted age ranges and how confident the model is in each. The output is a single STRING - "top 5 age ranges with probabilities" per the pack's README - so it's meant to be read by a human or logged, not wired into numeric logic. You'd use it for tagging datasets by apparent subject age, or as a rough content-policy signal, and you'd treat the result as a hint rather than a verdict.

How it works

It's a transformer image-classifier from the HuggingFace ecosystem running inside the node - the same family as the pack's other single-purpose classifiers. The image is preprocessed, pushed through the model, and the top five classes (age buckets) come back with softmax probabilities. First run downloads the model weights from HuggingFace; after that it's cached.

Inputs and outputs are about as minimal as they get:

  • image - the IMAGE to classify.
  • STRING - the top five age ranges with their probabilities, as text.

Where it's useful - and where it isn't

The realistic use is dataset triage. If you're assembling training data and want to filter out or flag images by apparent age, this gives you an automated first pass you can spot-check. It's also the kind of thing you'd string together with the pack's other classifiers to build an "about this image" summary line.

Where it fails: AI-generated faces. Diffusion models produce people whose apparent age is often ambiguous or inconsistent - a "25-year-old" whose eyes say 40. The model will still commit to a top-5 answer, and it'll be confidently wrong sometimes. Don't use any single classifier's age output as a hard decision; stack it with other signals and eyeball the borderline cases. That's true of the whole family of these nodes, and age is where it's most visible.

Install and notes

Install is the pack install, one time: ComfyUI Manager → search "ComfyUI-LexTools", or git clone https://github.com/SOELexicon/ComfyUI-LexTools into custom_nodes, then restart. transformers is the dependency that matters; the model downloads on first use, so the first run stalls for a bit and then it's fast.

A couple of practical notes. The output is text-only, so if you want the top probability as a number for filtering, you'll be parsing the string - annoying, but the string is at least human-readable. And because the pack's classification nodes are a niche corner of an already-niche pack, there's essentially no community write-up to lean on; your own tests are the documentation. Run it on a few images you know the answer to before trusting it on the ones you don't.

CategoryLexTools/ImageProcessing/Classification

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
STRINGSTRING