Number List Statistics
Read a whole list of numbers back — mean, min, max, and why it matters
- values
- sum
- mean
- min
- max
- median
- range
- count
- summary
When you start generating schedules with Number Range and Number Easing - denoise ramps, strength curves, camera moves - you're working with lists of numbers you can't see. Number List Statistics is the instrument panel for that invisible data. Feed it the list and it hands back sum, mean, min, max, median, range and count, each as a single value on its own socket.
The reason that's worth a node: every figure comes out as a single value rather than a list, so the graph below runs once, however long the list is. If you've wired a list into something expecting one number and watched it execute a hundred times, you know exactly why that distinction matters.
What it measures
Give it numbers one per line, comma-separated, or wire in a LIST from Number Range or a text list node. You get:
sum- everything added up. 1, 2, 3 gives 6.mean- the average. Read it besidemedian: one far-off value drags the mean, so 1, 2, 90 averages to 31 while the median is 2.min/max- the ends of the range.median- the middle value once sorted.range- max minus min, the width the values cover.count- how many values were read.summary- every figure on one line, rounded, ready to paste into a caption or log.
unreadable picks what an entry that isn't a number does (skip leaves it out and lowers count, zero counts it as 0 and pulls the mean down, the third option stops the run and names it), and decimals controls the rounding everywhere.
The two moves that make it useful
The tooltips carry two real recipes. Normalize a schedule against its own peak: divide each value by max. Turn weights into shares: divide each value by sum. Do the actual dividing with Number Expression, which has the slots for it, and you've built a tiny analysis loop without leaving the number category.
The other practical use is validation. When an easing curve or a generated range isn't behaving - a "0 to 1" ramp that peaks at 0.4, say - run it through this node and the mean, max and range tell you instantly whether the problem is the source range or the curve. It's the fastest way to debug a schedule short of printing every value.
Setup
It's part of WAS Node Suite v3. ComfyUI Manager → search WAS Node Suite v3, or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
Restart after; needs ComfyUI 0.14.0+ and Python 3.10+. As with the rest of the v3 pack there's nothing extra to install - the rewrite runs on the torch that ComfyUI already has, where the old v2 pack pulled in twenty packages and broke on updates.
One honest note: the outputs are single values, which is exactly what makes them easy to wire into a condition or a switch. range of 0 means every value is the same - and the tooltip warns that dividing by it to normalize is undefined, so check for that before you divide.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| values | STRING,ARRAY,NUMBER,FLOAT,INT | The numbers to measure, one to a line or separated by commas, or a LIST wired in from Number Range or Text List. A comma separates values rather than marking thousands, so 1,000 reads as two values. | |
| unreadable | COMBO | What an entry that is not a number does. `skip` leaves it out and lowers count, `zero` counts it as 0 and pulls the mean down, `error` stops the prompt and names the entry. | |
| decimals | INT | 40–12 | Decimal places every figure is rounded to, on the outputs and in the summary. 0 = whole numbers; 2 = 0.33; 6 = 0.333333. Raise it where sum or mean feeds further maths. |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| sum | FLOAT | Every value added together. 1, 2, 3 gives 6. Divide a value by this to get its share of the whole. |
| mean | FLOAT | The average, which is sum divided by count. 1, 2, 6 gives 3. A single far-off value drags it, so read it beside median. |
| min | FLOAT | The smallest value. 4, 1, 9 gives 1. Subtract it from each value and divide by range to spread a schedule across 0 to 1. |
| max | FLOAT | The largest value. 4, 1, 9 gives 9. Divide each value by this to normalise a schedule against its own peak. |
| median | FLOAT | The middle value once sorted, or the average of the middle two when count is even. 1, 2, 90 gives 2, where mean gives 31. |
| range | FLOAT | max minus min, the width the values cover. 4, 1, 9 gives 8. 0 means every value is the same, so dividing by it to normalise would fail. |
| count | INT | How many values were read. `skip` leaves an entry holding no number out, so 4 entries with one word among them gives 3, where `zero` gives 4. Compare it with the entries given to see how many held no number. |
| summary | STRING | Every figure on one line, rounded to decimals: `count 3, sum 6.0000, mean 2.0000, min 1.0000, max 3.0000, median 2.0000, range 2.0000`. Wire it to a text preview or into a filename. |