Eric's Enhanced Metadata Filter V2
The friendlier search box for your image metadata
- matched_paths
- match_count
- images
Metadata filter nodes tend to accumulate switches until using them is harder than just eyeballing the folder. Enhanced Metadata Filter V2 is the pack's attempt to keep it simple: fewer field types, fewer operations, one obvious "value" box, and an escape hatch for power users. If Eric_Metadata_Filter_V2 is the Swiss-army version, this is the "give me the common cases" version.
It's part of the AAA Metadata System pack's metadata family, and it does the same core job - find images in a folder whose metadata matches a query - with a leaner surface. For the beginner who just wants "show me everything using this model" without studying twelve dropdowns, this is the better starting point.
How it works
You point it at a folder_path, pick a field_type and operation, type a value, and it queries the pack's metadata store - the SQLite database when use_database is on (fast), otherwise a direct scan of the files. Under the hood it builds a structured query from those friendly parameters and runs it through the pack's query machinery. The power-user hook is additional_query: when the dropdowns can't express what you need, you drop a JSON-formatted query in there and it layers on top of the simple criteria.
The simplifications are real: this version has eight field_type choices (keywords, aesthetic_score, technical_score, prompt, model, directory, lora, any_text) instead of twelve, and six operations (contains, equals, greater_than, less_than, between, exists) instead of seven. No custom field type, no missing operation, no sort controls. If you need those, that's what the full filter V2 is for.
Inputs and outputs that matter
folder_path- where to search (required, string).field_type- keywords, prompt, model, lora, directory, aesthetic_score, technical_score, any_text.operation- contains, equals, greater_than, less_than, between, exists.value(andvalue2forbetween) - the search term.limit- default 10, caps results at 100 max in this version (the full filter goes to 1,000).load_images- return the matched images as an IMAGE output or just paths.use_database- prefer the fast DB path (default on).additional_query- the JSON escape hatch.
Outputs: matched_paths (STRING), match_count (INT), and images (IMAGE, when requested).
Installing it
Part of AAA Metadata System by Eric Hiss (GitHub: EricRollei). 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. No extra downloads.
Common issues
The same data trap as the other filter: no metadata, no matches. Images saved by a bare Save Image node carry no prompt/model keywords, so a model query returns nothing even though the folder looks full of results. If you get 10 results and expect more, that's the limit - this version caps lower than its sibling, so raise it or switch nodes. And note recursive_search defaults to off here, unlike the full filter - if you're pointing at a folder with subfolders, flip it on or you'll only search the top level. If you outgrow it, the full Eric_Metadata_Filter_V2 adds custom fields, more operations, and sorting.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | — | |
| field_type | COMBO | keywords | 8 options: keywords, aesthetic_score, technical_score, prompt, model, directory, +2 |
| operation | COMBO | contains | 6 options: contains, equals, greater_than, less_than, between, exists |
| value | STRING | — | |
| value2 | STRING | — | |
| limit | INT | 101–100 | — |
| load_images | BOOLEAN | false | — |
| use_database | BOOLEAN | true | — |
| additional_queryopt | STRING | — | |
| recursive_searchopt | BOOLEAN | false | — |
| debug_loggingopt | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| matched_paths | STRING | — |
| match_count | INT | — |
| images | IMAGE | — |