Nodes/ComfyUI Deepface/Average List
ComfyUI Node

Average List

The pack's own helper that just averages your numbers

By jordoh·Created 3 years ago·Updated 2 months ago· 38
Average List
    • FLOAT
    numbers

    Let's be honest about this one: Average List is not why anyone installs jordoh/ComfyUI-Deepface. It's a three-line utility that takes a list of numbers and returns their average, it's not mentioned anywhere in the pack's README, and it's filed under "sd" in the registry while the rest of the pack is "deepface" - the author seems to have just thrown it in. But it ships here for a reason: the pack's headline node outputs one distance number per image, and when you're comparing batches you want one number for the whole run, not forty.

    What it does

    Takes a numbers input (a NUMBER - a list of numbers, or a single value) and returns the average as a FLOAT. Empty list? Returns 0.0 rather than crashing. That's the entire feature set, straight from the source:

    def average(self, numbers):
        if not numbers:
            return (0.0,)
        return (sum(numbers) / len(numbers),)
    

    How you'd actually use it

    The intended flow is feeding it Deepface Verify's verified_image_distances (or rejected_image_distances) to collapse a whole batch into one likeness score. Run the same workflow against two checkpoints, compare the averages, and you have a crude but genuinely useful signal for whether your finetune moved the needle - which is exactly the CeFurkan-style finetune-evaluation idea the whole pack is built around.

    One wiring caveat: for it to average a list, the upstream node has to actually output a NUMBER list. A plain float widget feeding numbers will happily average that single value, which is probably not what you meant.

    The honest take

    If averaging numbers is your only reason to install this pack, don't. You'd be pulling in TensorFlow - the requirements are deepface==0.0.89 plus tf_keras, which drags a multi-gigabyte deep learning framework into your ComfyUI environment just to compute sum/len. Any generic "average numbers" node from a utility pack does the identical job without the baggage. Average List is fine where it lives, as the pack's own plumbing; it's just not a destination.

    Installing (if you're here anyway)

    You're getting the whole pack either way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jordoh/ComfyUI-Deepface
    cd ComfyUI-Deepface
    pip install -r requirements.txt
    

    Or ComfyUI Manager → search "ComfyUI Deepface". Restart and it's there. Just don't weigh this node in the decision to install.

    Categorysd

    Inputs (1)

    NameTypeDefaultDescription
    numbersNUMBER

    Outputs (1)

    NameTypeDescription
    FLOATFLOAT