Load MiVOLO Model
The boring node every age/gender workflow starts with
- MIVOLO_MODEL
If you're building any age/gender workflow with this pack, this is where you start - and honestly, the node's whole job is one of those boring-but-good ones. It loads the MiVOLO model once and hands it to the predictor nodes over a single opaque wire, so you're not re-downloading or re-instantiating a multi-hundred-MB model every time you press Queue. The name on the canvas reads Load MiVOLO Model; the class behind it is MiVOLOLoader.
What it actually is
MiVOLO is a Transformer-based model from a 2023 paper ("MiVOLO: Multi-input Transformer for Age and Gender Estimation"), and this pack wraps the iitolstykh/mivolo_v2 Hugging Face checkpoint. Under the hood the loader is a transformers wrapper: it pulls the model with AutoModelForImageClassification plus its image processor and config, runs it in fp16 if ComfyUI thinks your setup should use it, and holds it in memory for the rest of the graph.
Two details are worth knowing because they bite:
- The model is loaded with
trust_remote_code=True. The HF repo ships custom model code, so ComfyUI executes code from that repo at load time. That's normal for this checkpoint, but it's also exactly why you shouldn't point this loader at random HF repos that claim to be "MiVOLO" - only load things you trust. - The loader scans
ComfyUI/models/mivolo/for folders containing aconfig.jsonand lists them in the dropdown. So the "automatic download" path and the "I cloned the repo myself for offline use" path end in the same place: it shows up in this dropdown either way.
The one input and the one output
This node is about as minimal as ComfyUI loaders get. There's exactly one input:
- model_name - a dropdown, defaulting to
iitolstykh/mivolo_v2. If you've dropped a local copy intoComfyUI/models/mivolo/, it appears here as an option. You'll basically never touch this after the first run.
And one output:
- MIVOLO_MODEL - a package containing the model, image processor, and config. Don't try to read values out of it; it's not meant for you. It wires straight into MiVOLO Predictor (from Crops) or MiVOLO Predictor (with Detector).
How to get it
Install the pack once (ComfyUI Manager → search ComfyUI-MiVolo-V2, or manually):
cd ComfyUI/custom_nodes/
git clone https://github.com/deng-wei/ComfyUI-MiVolo-V2.git
pip install -r requirements.txt
Then restart ComfyUI. The first time you run a workflow, the model downloads automatically from Hugging Face and caches to ComfyUI/models/mivolo/. If you're offline, clone the repo manually into that folder instead - the path structure it expects is ComfyUI/models/mivolo/iitolstykh/mivolo_v2/.
Common gotchas
- Heavy install. The pack's
requirements.txtdrags intransformers,accelerate, andultralytics, plus amivolopackage pulled straight from GitHub. That install can take a while and occasionally trips over a dependency conflict with whatever else you've got loaded - if you use ComfyUI Manager, let it handle the deps and check the install log. - Trust the repo before you let it run. Worth repeating:
trust_remote_code=Truemeans the node executes model code from the HF repo on load. The stockiitolstykh/mivolo_v2is fine; random lookalikes are how supply-chain surprises happen. - Nothing happens on first queue? The download is the bottleneck. Give it time and watch the console for the
MiVOLO: Loading age/gender model from:line. If it errors there, it's usually a network or disk-space problem, not a node problem.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 1 options: iitolstykh/mivolo_v2 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MIVOLO_MODEL | MIVOLO_MODEL | — |