MiVOLO Predictor (with Detector)
The all-in-one node — drop in an image, get age and gender per person
- mivolo_model
- detector_model
- image
- prediction_text
- age
- gender
This is the node the pack is really about. MiVOLO Predictor (with Detector), class MiVOLOAgeGenderPredictorWithDetector, does the whole pipeline in one place: a YOLO detector finds the people and faces, MiVOLO predicts age and gender for each, and you get clean string outputs on the other side. If you only wire up one node from this pack, it's this one.
How it works, end to end
Feed it a full image and it runs four steps internally:
- The YOLO detector (
yolov8x_person_face.pt) scans the frame at your chosenconf_thresholdandiou_threshold, producing person boxes (class 0) and face boxes (class 1). - It associates each face with the person whose bounding box contains the face's center - so faces get paired with the right body, not just the nearest one.
- It crops each person's face and body and runs MiVOLO on the pair.
- It assembles the results into strings.
The mode dropdown controls what gets detected at all: Use persons and faces (the default, and the smart one - remember, MiVOLO gets a real accuracy bump from seeing body plus face), Use persons only, or Use faces only. The output_selection dropdown picks between All and Largest Person.
Inputs and outputs that matter
- mivolo_model (required) - from Load MiVOLO Model.
- detector_model (required) - from Load MiVOLO Detector (YOLO).
- image (required) - the full frame.
- mode - persons+faces / persons only / faces only, default
Use persons and faces. - output_selection -
All(default) orLargest Person. - conf_threshold - default 0.4, range 0.01–1.0. This is the one beginners actually tune: if the detector is missing people, lower it; if it's firing on background noise, raise it.
- iou_threshold - default 0.7. Non-max suppression overlap; you can leave this alone unless duplicate boxes appear.
Outputs, all STRING:
- prediction_text - with
All, multi-person results come back as separate lines (Person 1: a 34 year old male,Person 2: ...). WithLargest Person, it's a single human-readable prediction. - age -
Allmode returns comma-separated ages (34,27);Largest Personreturns one. - gender - same pattern, comma-separated in
Allmode.
The two things that will trip you up
- Multi-person output is a string, not a list. "All" joins everything into comma-separated strings, and
prediction_textis newline-joined. If you want to do anything per-person - "only keep people over 18," for instance - you'll be splitting and parsing strings, and the comma-separated format is exactly what you'll fight. For that kind of logic,Largest Personmode plus a string-to-number conversion is the calmer path. - Only the first image in a batch gets processed. Feed a batched IMAGE and it silently keeps
[0](it prints a warning, so the console is your friend). Batch mode for real multi-image workflows isn't built in.
Also note the prediction is a heuristic, not a guarantee - the community uses MiVOLO-class models as age gates and quality checks on AI portraits, and they're genuinely useful for that, but they misjudge around age boundaries often enough that you shouldn't build anything legally load-bearing on it.
Install
Same pack, one install: ComfyUI Manager → search ComfyUI-MiVolo-V2, or:
cd ComfyUI/custom_nodes/
git clone https://github.com/deng-wei/ComfyUI-MiVolo-V2.git
pip install -r requirements.txt
Both models auto-download on first run (MiVOLO into ComfyUI/models/mivolo/, the detector .pt into ComfyUI/models/yolo/). First run is slow - that's the downloads, not a hang. If the detector returns "No objects detected or processed," it's usually the confidence threshold: drop conf_threshold toward 0.25–0.3 and retry.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| mivolo_model | MIVOLO_MODEL | — | |
| detector_model | DETECTOR_MODEL | — | |
| image | IMAGE | — | |
| mode | COMBO | 3 options: Use persons and faces, Use persons only, Use faces only | |
| output_selection | COMBO | 2 options: All, Largest Person | |
| conf_threshold | FLOAT | 0.400.01–1 | — |
| iou_threshold | FLOAT | 0.700.01–1 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| prediction_text | STRING | — |
| age | STRING | — |
| gender | STRING | — |