ImageQualityScoreNode
One number that says 'this image is worth keeping'
- FLOAT
ImageQualityScoreNode is the mixing board for everything this pack thinks about an image. It takes the scores from your other analysis nodes - aesthetic score, AI-detection confidence, and optional "good/bad" ratings - applies weights to each, and sums them into a single quality number you can sort on, threshold on, or log. If the rest of LexTools is sensors, this is the dashboard.
The setup it's made for: you've generated a batch, and you want a rankable "is this one good?" value per image. Rather than juggling four separate numbers, you wire them all into this node, tune how much each contributes, and get one FLOAT out the other end. Feed that into the pack's filter nodes or the ImageRankingNode's score input and you have an automated keep-or-discard pipeline. The is_output_node flag in the schema means ComfyUI treats it as a terminal - it's the end of a scoring branch, the last thing before you act on the result.
The inputs that matter
- aesthetic_score (INT, required) - the aesthetic rating, typically from an aesthetic-score model. The pack's own aesthetic nodes feed this.
- ai_score_artificial and ai_score_human (FLOAT, required) - the two outputs of ArtOrHumanClassifierNode. Artificial-vs-human detection, fed in as the "AI detection" signal.
- show_on_node (INT, required, default 0) - set to 1 to print the result on the node itself.
The optional weights - weight_aesthetic_score, weight_AIDetection, weight_HumanDetection, weight_good_score, weight_bad_score (all default 1.0) - are the actual dials. Crank weight_aesthetic_score if you care about composition and don't care about AI-look; drop weight_AIDetection if the detector is crying wolf on a style you like. image_score_good / image_score_bad are extra signals you can supply if you have them. And MultiplyScoreBy (default 100000) scales the final number way up - the author clearly wants big, sortable integers for ranking, so leave it unless you know why you're changing it.
Output: a single FLOAT - the weighted, scaled quality score.
How to actually use it
The realistic chain: Image → aesthetic scorer → ImageQualityScoreNode; Image → ArtOrHumanClassifier → ai_score_* → ImageQualityScoreNode → FLOAT → ImageFilterByFloatScoreNode (keep above threshold) → ImageRankingNode (log the winner). It's clunkier than a purpose-built "aesthetic only" node, but it's the only place in the pack where you can weight multiple quality signals into one number - and for batch sweeps that's worth the wiring.
Gotchas
Two real ones. First, the required inputs aren't optional - the node errors if aesthetic_score, ai_score_artificial, or ai_score_human aren't wired, so you can't use it as a plain aesthetic scorer without feeding the AI-detection pair somehow. Second, the scoring ecosystem this pack wraps is fragile: the single community thread about LexTools scoring (r/comfyui, March 2024) is someone hitting a "Expected all tensors to be on same device" error wiring a HuggingFace aesthetic predictor in, and the top reply is "just use a different pack". Expect to spend a little time on device/dependency setup before the scores are trustworthy.
Install
Pack install, once: ComfyUI Manager → search "ComfyUI-LexTools", or git clone https://github.com/SOELexicon/ComfyUI-LexTools into custom_nodes, restart. Needs transformers and friends; the underlying scoring models download from HuggingFace on first use. Check the score on a few images you already know are good and bad before you trust the thresholds - a score that says 5/10 on something you love is a weighting problem, not a model problem.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| aesthetic_score | INT | — | |
| ai_score_artificial | FLOAT | — | |
| ai_score_human | FLOAT | — | |
| show_on_node | INT | 0 | — |
| image_score_goodopt | FLOAT | 0.00 | — |
| image_score_badopt | FLOAT | 0.00 | — |
| weight_good_scoreopt | FLOAT | 1.00 | — |
| weight_aesthetic_scoreopt | FLOAT | 1.00 | — |
| weight_bad_scoreopt | FLOAT | 1.00 | — |
| weight_AIDetectionopt | FLOAT | 1.00 | — |
| weight_HumanDetectionopt | FLOAT | 1.00 | — |
| MultiplyScoreByopt | FLOAT | 100000.00 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | — |