ComfyUI Node

ScoreToNumber

The adapter that lets other nodes read your aesthetic score

By strimmlarn·Created 3 years ago·Updated 2 years ago· 35
ScoreToNumber
  • score
  • NUMBER

ComfyUI has a type system that's really a suggestion system. Custom packs define their own socket types - like this pack's SCORE - so they can stop you from plugging an aesthetic rating into an image slot. That's great until you actually want to use the number, because everything else in your graph speaks NUMBER. ScoreToNumber is the bridge: it takes the pack's SCORE and hands it out as a plain NUMBER that the rest of ComfyUI can read.

That's the entire job. It doesn't scale, round, clamp, or re-interpret the score. convert just returns whatever it got. If CalculateAestheticScore hands you 640, ScoreToNumber hands the next node 640.

Why it exists

The README says it plainly: "Alot of stuff in Was Node Suite use number as intput." WAS nodes are everywhere in utility workflows - string concatenation, conditionals, image-to-text - and a lot of them want a real number rather than a custom score type. So the flow is: CalculateAestheticScore → ScoreToNumber → whatever WAS node you're feeding.

Where you'd actually reach for it:

  • Putting the score into a text node so it lands in a filename or an EXIF comment - "score_640.png".
  • Feeding a conditional or a threshold node: "keep only images above 700."
  • Sending the score to a batch/loop router so high scorers take a different path than low scorers.

The input is one socket - score (SCORE) - and the output is one socket - NUMBER. Nothing else to set, no parameters, no model, no downloads. It's the node you forget exists until you need it.

Install

It ships with the pack, like the rest:

cd ComfyUI/custom_nodes
git clone https://github.com/strimmlarn/ComfyUI-Strimmlarns-Aesthetic-Score
pip install -r requirement.txt

(That filename is requirement.txt, singular - the README's requirements.txt is a typo.) Or ComfyUI Manager, search "Strimmlarns". Restart after installing. This node itself has zero dependencies beyond the pack - the only heavy install the pack needs is OpenAI's clip from GitHub, which the scoring node pulls in.

Common issues

ScoreToNumber is a pass-through, so its failure modes are upstream. The two things that actually bite people:

  • The score is already ×100. If you're comparing "score" values against your own threshold, remember CalculateAestheticScore multiplies the 1–10 model output by 100. A "7" in your head is 700 at this node. Set your threshold in the right scale or every image will pass or fail weirdly.
  • Sockets that won't connect. If a target node's input is a custom INT type rather than ComfyUI's generic NUMBER - some packs define their own integer sockets - the plug may still refuse. That's a limitation of the target node's type, not this one. When in doubt, check what type the destination actually wants.

That's honestly it. It's a tiny adapter that does one thing with no moving parts. If your workflow works without it, you don't need it - but the moment you want the score inside a filename, a condition, or a WAS node, this is the two-node solution's missing piece.

Categoryaestheticscore

Inputs (1)

NameTypeDefaultDescription
scoreSCORE

Outputs (1)

NameTypeDescription
NUMBERNUMBER