Eric's Metadata Filter V2
Find every image that used that model, in seconds
- matched_paths
- match_count
- images
"Which of my 4,000 output images used this LoRA?" is a question no file explorer answers. Eric's Metadata Filter V2 does: point it at a folder, tell it which metadata field to look at, and it hands back the matching files, a count, and optionally the images themselves. If you keep a metadata database on your generations, this is the node that turns it into a search engine.
It's part of the AAA Metadata System pack's metadata family, and it's a power tool for anyone who's been saving with metadata-aware nodes. The pack's metadata structure records things like prompt, model, rating, aesthetic and technical scores, LoRA usage, and face/blur analysis - this filter queries all of that. It's also useful for QA: "show me everything in this folder rated below 3" or "everything that used the broken model."
How it works
You give it a folder and a query. It searches either the pack's SQLite database (fast, structured) or falls back to scanning the folder and reading each image's metadata directly. The field_type dropdown picks what you're filtering on, operation picks how, and value is the needle. The search is substring-friendly by default (include_substrings on, case-insensitive unless you say otherwise), and results can be sorted and limited.
The advanced_query field is the escape hatch: when the friendly dropdowns aren't enough, you can drop in a structured query there instead. If the results ever look wrong and use_database is on, try switching it off to scan files directly - the two paths can disagree if the database is stale.
Inputs and outputs that matter
The three that define a query:
folder_path- where to look (required, string).field_type- keywords, aesthetic_score, technical_score, prompt, model, directory, lora, any_text, rating, faces, blur, or custom.custompluscustom_fieldis how you query something not in the list.operation- contains, equals, greater_than, less_than, between, exists, missing. Pairbetweenwithvalueandvalue2.
The limit (default 10) caps results so you don't get a 4,000-item dump; load_images decides whether the actual images come back as an IMAGE output or just paths.
Outputs: matched_paths (the file paths, as one string), match_count (how many matched), and images (an IMAGE batch, only if you asked for it).
Installing it
Ships in AAA Metadata System by Eric Hiss (GitHub: EricRollei). Install via ComfyUI Manager (search "AAA Metadata System") or:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/AAA_Metadata_System.git
cd AAA_Metadata_System
pip install -r requirements.txt
Restart ComfyUI. Nothing extra to download.
Common issues
The most common "failure" is empty results, and it's almost always the same root cause: the images in that folder have no readable metadata because they weren't saved by a metadata-writing node, or the database is empty. The filter is only as good as the data - no metadata, no matches. If you're sure the metadata exists, check field_type: filtering aesthetic_score when the images only have prompts will return nothing even though prompt would. And watch limit - if you expect 50 matches and get 10, that's the cap doing its job, not a bug. For a slightly friendlier version of this node with fewer knobs, the pack also ships Enhanced Metadata Filter V2.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | — | |
| field_type | COMBO | keywords | 12 options: keywords, aesthetic_score, technical_score, prompt, model, directory, +6 |
| operation | COMBO | contains | 7 options: contains, equals, greater_than, less_than, between, exists, +1 |
| value | STRING | — | |
| limit | INT | 101–1000 | — |
| value2opt | STRING | — | |
| custom_fieldopt | STRING | — | |
| recursive_searchopt | BOOLEAN | true | — |
| use_databaseopt | BOOLEAN | true | — |
| include_substringsopt | BOOLEAN | true | — |
| case_sensitiveopt | BOOLEAN | false | — |
| load_imagesopt | BOOLEAN | false | — |
| skip_missingopt | BOOLEAN | true | — |
| sort_byopt | COMBO | none | 5 options: none, filename, modified_date, created_date, value |
| sort_descendingopt | BOOLEAN | false | — |
| advanced_queryopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| matched_paths | STRING | — |
| match_count | INT | — |
| images | IMAGE | — |