Nodes/fexli-util-node-comfyui/FEEncLoraAutoLoader
ComfyUI Node

FEEncLoraAutoLoader

LoRAs that load themselves from your prompt

By fexli·Created 3 years ago·Updated about a year ago· 3
FEEncLoraAutoLoader
  • model
  • clip
  • MODEL
  • CLIP
  • prompt
  • EXTRA
model_type
prompt
strength_model1.00
strength_clip1.00

The recurring pain with LoRAs in ComfyUI is bookkeeping: pick the right file, set two strengths, remember the trigger words, repeat per LoRA. FEEncLoraAutoLoader tries to delete the whole category of problem. You type <lora:character_name:0.8> inside your prompt text - the same A1111-style syntax you might already know - and this node parses the tag, loads that LoRA from your loras folder at that strength, and hands you back the prompt with the tags stripped so the text encoder never sees them.

The mechanism is worth understanding because it explains both what's cool and what can bite you. The node scans the prompt for <lora:...> tags. For each one it resolves the inner name to a file in your loras folder (it tries the name as-is, then with .safetensors appended), reads the strength from the tag - one number applies to both model and clip, two numbers give you separate strength_model:strength_clip - and appends that to the load list. Tags that don't resolve to a real file aren't loaded; the node leaves a marker in the output prompt so you can see it silently failed.

On top of that it reads lora_autoinit_map.json from your models/loras folder, if present. That file maps trigger words to LoRAs per model type, and when a mapped trigger word appears in the prompt as a <lora:triggerword:...> tag, the mapped LoRA loads and the tag gets replaced by the trigger word text (or whatever replace value you set in the map). That's the "automap" half of the name - it's how you make a character tag both load the LoRA and leave the word in the prompt.

The inputs that matter

  • model / clip - from your checkpoint loader.
  • model_type - the critical dropdown: sd1.5, sdxl, sd3, sd3.5, pony, il, noob, flux. Automap entries are filtered by this, and the tag-parsing is architecture-agnostic, so get it right or your triggers won't match.
  • prompt - the string your <lora:...> tags live in. Wire it from your text input.
  • strength_model / strength_clip - defaults of 1.0, used for any tag that doesn't specify its own strength.

Outputs: MODEL and CLIP for the sampler, the rewritten prompt (tags stripped, so feed this into your CLIP text encode instead of the original), and EXTRA - the same *-typed metadata bag as the pack's other loader.

It's a genuinely nice idea and it slots straight into a normal txt2img chain: one loader node, prompt tags, done. But be honest about what it's replacing. The mainstream answer to "auto load trigger words" in the community is a right-click in rgthree's Power Lora Loader or a dedicated trigger-word helper - this node goes further by keeping everything in the prompt text, which is exactly what you want if your prompts are stored as files and reused. The cost is the silent-failure mode: a typo'd or missing LoRA tag fails without a clear error, the same "ComfyUI just ignores it" behavior the community complains about with mismatched LoRAs. Check the !<lora:...> markers in the output prompt - that's the node telling you a tag didn't resolve.

Categoryloaders

Inputs (6)

NameTypeDefaultDescription
modelMODEL
clipCLIP
model_typeCOMBO8 options: sd1.5, sdxl, sd3, sd3.5, pony, il, +2
promptSTRING
strength_modelFLOAT1.00-20–20
strength_clipFLOAT1.00-20–20

Outputs (4)

NameTypeDescription
MODELMODELThe modified diffusion model.
CLIPCLIPThe modified CLIP model.
promptSTRING
EXTRA*