Eric Civitai Prompt Extractor + Auto LoRA Loader
Load the image, get back the model and LoRAs that made it
- model
- clip
- model
- clip
- image
- mask
- filename
- full_path
- positive_prompt
- negative_prompt
- sampler
- cfg
- seed
- clip_skip
- resources
- raw_exif
- file_count
- current_index
- status
The plain Civitai extractor hands you the recipe. This one cooks it. Eric Civitai Prompt Extractor + Auto LoRA Loader reads the prompt and LoRA list out of an image like its sibling, then actually applies those LoRAs to the model and CLIP you feed in - so a gallery image can walk into your workflow and come back as a fully loaded, reproduction-ready setup. That's the whole trick: reconstruction without retyping.
It's from the AAA Metadata System pack, and it's the extractor family's showpiece. The honest catch: it can only auto-load the LoRAs you actually have locally. The resources list in the metadata names them, and the node matches those names against your installed LoRAs. If a LoRA isn't in your collection, it gets skipped (and status tells you what happened). So this is at its best when you've downloaded the exact set that made the image.
How it works
Same extraction as the base node - reads the EXIF UserComment via ExifTool, parses the recipe. Then the extra step: it decodes the resources list, matches each named LoRA to a file in your LoRA folders, and applies them to your model and clip inputs in order, honoring the recorded weights when use_resource_weights is on or falling back to default_strength (0.75) and default_clip_strength (1.0). max_loras (default 4) caps how many get applied - a busy workflow may reference a dozen.
When a LoRA isn't found locally, it can do a clever fallback: with query_civitai on, it queries the Civitai API to identify the resource and try to resolve it. There's a local cache (civitai_cache.json) so repeat lookups are fast, and refresh_lora_index forces a rescan of your LoRA folders. Every action gets logged into the status output - applied X, skipped Y (not found) - which is the single most useful string in this node.
Inputs and outputs that matter
modelandclip- required inputs; these get the LoRAs applied. Wire from your checkpoint loader.- Everything the base extractor takes (
image,use_folder,folder_path,exiftool_path, etc.). max_loras- how many LoRAs to apply (0–16).use_primary_only- apply just the primary LoRA and skip the rest.use_resource_weights- honor the strengths recorded in the metadata vs. use defaults.query_civitai- allow API lookups for missing LoRAs (network traffic, default on).refresh_lora_index- rebuild the local LoRA index.
Outputs: model and clip (now LoRA-stacked), everything the base extractor outputs (prompt, negative, sampler, cfg, seed, clip_skip, resources, raw_exif, image, mask, filenames and counts), plus a status string summarizing the loads and skips.
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
And install ExifTool (exiftool.org, or your package manager) - this node's extraction depends on it, same as the base extractor. Restart ComfyUI.
Common issues
Expect some LoRAs to be skipped; that's normal when you don't own the exact set, and status will say so - read it before assuming the result is wrong. If extraction returns empty, ExifTool is the first suspect (see the base extractor's notes). Weights rarely reproduce exactly: the recorded strength is what the author used on their setup, and default_strength is a guess for anything unrecorded, so treat the output as a starting point, not a forensic copy. And query_civitai means real network calls on first runs with new LoRAs - if it's slow, that's the API round-trip, not a hang. When it works, it's the closest thing to drag-the-image-in-and-reproduce.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| image | COMBO | 1 options: example.png | |
| use_folder | BOOLEAN | false | — |
| folder_path | STRING | — | |
| folder_index | INT | 00–10000000 | — |
| auto_increment | BOOLEAN | false | — |
| write_txt | BOOLEAN | false | — |
| txt_directory | STRING | — | |
| exiftool_path | STRING | — | |
| max_lorasopt | INT | 40–16 | — |
| use_primary_onlyopt | BOOLEAN | true | — |
| use_resource_weightsopt | BOOLEAN | true | — |
| default_strengthopt | FLOAT | 0.750–5 | — |
| default_clip_strengthopt | FLOAT | 1.00-10–10 | — |
| query_civitaiopt | BOOLEAN | true | — |
| refresh_lora_indexopt | BOOLEAN | false | — |
Outputs (17)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| clip | CLIP | — |
| image | IMAGE | — |
| mask | MASK | — |
| filename | STRING | — |
| full_path | STRING | — |
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |
| sampler | STRING | — |
| cfg | FLOAT | — |
| seed | INT | — |
| clip_skip | INT | — |
| resources | STRING | — |
| raw_exif | STRING | — |
| file_count | INT | — |
| current_index | INT | — |
| status | STRING | — |