Nodes/AAA Metadata System/LoRA Tester v03
ComfyUI Node

LoRA Tester v03

Batch-test your LoRA folder without touching your workflow

By EricRollei·Created 10 months ago·Updated 9 months ago· 13
LoRA Tester v03
  • model
  • clip
  • model
  • clip
  • lora_name
  • lora_path
  • trigger_words_all
  • trigger_words_selected
  • combined_prompt
  • lora_list
  • total_loras
  • selected_loras
  • associated_images
  • model_strength_used
  • clip_strength_used
  • gallery_images
dir_search_terms
file_search_terms
additional_path
architectureAny
categoryAny
trigger_search
seed0
modedirect_load
model_strength0.80
clip_strength1.00
use_database_defaultstrue
query_civitaifalse
force_civitai_fetchfalse
prompt_placementauto
max_gallery_images50
gallery_image_size512
input_prompt
primary_trigger_override

Testing LoRAs is usually a grind: swap the file, re-run, compare, swap again. LoRA Tester v03 turns that into a search-and-select problem. It scans your LoRA folders, filters by filename, architecture, category, and trigger words, picks one (or a random one), applies it to your model and CLIP, and can even insert the trigger words into your prompt for you. It's the highest-leverage node in the AAA Metadata System pack's LoRA family, and it's the one I'd reach for when I have forty style LoRAs and no idea which ones are actually good.

The killer feature is the filtering. Instead of scrolling a dropdown, you type comma-separated search terms - and -term to exclude. So -pony,-inpaint in file search terms skips everything tagged for those variants. Combined with seed (0 = pick a random matching LoRA), it becomes a lottery machine for your own library: re-run and see what different LoRAs do to the same prompt.

How it works

The node maintains a local catalog of your LoRAs in lora_tester_db.json, recording each file's architecture, category, and trigger words. On each run it filters that catalog by your criteria, picks the LoRA at seed (or a random one), and in direct_load mode applies it to the MODEL and CLIP you feed in. In info_only mode it skips loading entirely and just hands you the info - handy for building selection UIs. If a LoRA has no trigger words recorded, query_civitai will hit the Civitai API to fetch them (that's a network call, so keep it off unless you need it). It also gathers "associated images" - same-basename previews sitting next to your LoRA files - into a gallery.

The prompt_placement setting decides whether trigger words get spliced into the beginning or end of your input_prompt, or not at all. If you're testing whether a LoRA does anything, wire the combined prompt and the images together and compare.

Inputs and outputs that matter

  • dir_search_terms / file_search_terms / additional_path - how you find the LoRAs. Comma-separated, -term to exclude, and additional_path for folders outside the standard ones.
  • architecture and category - filters against the catalog. "Any" if you don't care.
  • mode - direct_load (needs model and clip wired in) or info_only.
  • model_strength / clip_strength - the multipliers, default 0.8 / 1.0.
  • seed - 0 = random, 1 = first in the filtered list.
  • query_civitai / force_civitai_fetch - the network options. Leave off unless a LoRA is missing triggers.

Outputs: model, clip (the modified ones in direct_load), lora_name, lora_path, trigger_words_all, trigger_words_selected, combined_prompt, lora_list, total_loras, selected_loras, associated_images, gallery_images, and the two strength values used.

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. requests (for the Civitai calls) is in the core requirements.

Common issues

If nothing ever matches, the catalog is empty or the tags are wrong - run it once with empty filters so it scans and indexes, then check lora_list / total_loras. If direct_load mode errors, you forgot to wire model and clip in; that mode genuinely needs them. Random selection (seed 0) can feel broken when you "get the same one twice" - that's the RNG, not a bug; bump the seed. And remember Civitai queries are real network requests: on a fresh folder with query_civitai on, the first run can be slow while it fetches trigger words for everything.

Categoryloaders/lora tester

Inputs (20)

NameTypeDefaultDescription
dir_search_termsSTRINGComma-separated terms to search in directory paths. Use -term to exclude.
file_search_termsSTRINGComma-separated terms to search in LoRA filenames. Use -term to exclude (e.g., -pony,-inpaint).
additional_pathSTRINGAdditional directory to search for LoRAs
architectureCOMBOAnyFilter by model architecture
categoryCOMBOAnyFilter by LoRA category
trigger_searchSTRINGSearch terms to match in trigger words. Use -term to exclude.
seedINT00–18446744073709550000LoRA number to load (0 = random, 1 = first in list)
modeCOMBOdirect_loaddirect_load: Apply LoRA to model/CLIP, info_only: Just output LoRA info
model_strengthFLOAT0.80-5–5Strength multiplier for model (used if direct_load mode)
clip_strengthFLOAT1.00-5–5Strength multiplier for CLIP (used if direct_load mode)
use_database_defaultsBOOLEANtrueUse LoRA-specific defaults from database if available
query_civitaiBOOLEANfalseAutomatically query Civitai for trigger words when LoRA has none
force_civitai_fetchBOOLEANfalseForce fetch from Civitai even if tags already exist
prompt_placementCOMBOautoWhere to place trigger words: auto (use database setting), beginning, end, or none (no insertion)
max_gallery_imagesINT501–200Maximum number of images to include in gallery
gallery_image_sizeINT512128–1024Target size for gallery images (they will be resized to this)
modeloptMODELInput model (required for direct_load mode)
clipoptCLIPInput CLIP (required for direct_load mode)
input_promptoptSTRINGInput prompt text to combine with trigger words
primary_trigger_overrideoptSTRINGOverride the primary trigger word selection

Outputs (14)

NameTypeDescription
modelMODEL
clipCLIP
lora_nameSTRING
lora_pathSTRING
trigger_words_allSTRING
trigger_words_selectedSTRING
combined_promptSTRING
lora_listSTRING
total_lorasINT
selected_lorasINT
associated_imagesIMAGE
model_strength_usedFLOAT
clip_strength_usedFLOAT
gallery_imagesIMAGE