ComfyUI Node

AIHub Utils Load Lora

Apply a LoRA by name string — with the model-only switch for clip-sensitive styles

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Utils Load Lora
  • model
  • clip
  • MODEL
  • CLIP
lora
use_loader_model_onlyfalse
strength1.00

AIHubUtilsLoadLora is the LoRA applier in the otavanopisto ComfyUI-aihub-workflow-exposer load family, and it follows the pack's house style: the LoRA name is a string input, so a client or an expose can choose which LoRA to apply at runtime. That's the whole reason it exists as a separate node - the pack's README says it plainly for all four loaders: string inputs let you load dynamically from stored files, exposes, and so on.

Unlike the other loaders, it doesn't build a cache - instead it's a patcher: it takes an already-loaded MODEL and CLIP, applies the LoRA, and returns both back. The model has to come from somewhere upstream (AIHubUtilsLoadModel, AIHubExposeModel, or any model loader), which is how the pack keeps LoRA loading orthogonal to model loading - the two can be driven independently by the client.

The inputs that matter

  • model (MODEL) and clip (CLIP) - the objects to patch. Both required, even if you're going model-only.
  • lora (STRING) - the LoRA filename from models/loras. Empty means "no-op": the source just passes the model and clip through unchanged. That's a feature - a workflow where the client may or may not apply a LoRA works without branching.
  • strength (FLOAT) - default 1, range 0–10. This is the volume knob; the client can let the user dial it.
  • use_loader_model_only (BOOLEAN) - the interesting switch. false (default) applies the LoRA to both the model and the clip, via the standard LoraLoader. true routes to LoraLoaderModelOnly, patching the model weights only and leaving the CLIP untouched.

That last one is worth understanding, because it's a real-world LoRA distinction: some LoRAs - particularly style and certain character LoRAs - are trained to affect only the diffusion model and break or blur the conditioning if they also hit the text encoder. The pack's export system even carries a use_loader_model_only flag on LoRA metadata for exactly this reason. If a LoRA makes your prompts feel mushy, this switch is the first thing to try.

Outputs and wiring

Outputs are MODEL and CLIP - the patched versions - which chain onward to your sampler's model port and CLIPTextEncode's clip port. If the LoRA string is empty, these are just the same objects you fed in.

Gotchas

The classic mistake is wiring the LoRA name with an extension mismatch (my_lora.safetensors vs the folder listing) - the file simply won't resolve. And remember use_loader_model_only doesn't save you the CLIP input; the node still wants one even if it ignores it, so feed the graph normally. Strength over 1.0 is available but most LoRAs were trained around 0.7–1.0; pushing to 2+ usually produces artifacts, not "more style."

Install

No requirements - pack standard:

cd ComfyUI/custom_nodes
git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer

Restart ComfyUI. If your workflow lets the client pick LoRAs at runtime, this is the node that makes it work without hardcoding.

Categoryaihub/utils

Inputs (5)

NameTypeDefaultDescription
modelMODEL
clipCLIP
loraSTRINGThe Lora to load
use_loader_model_onlyBOOLEANfalseIf set to true, it will only apply the lora to the model and not to the clip
strengthFLOAT1.000–10The strength of the lora to apply

Outputs (2)

NameTypeDescription
MODELMODEL
CLIPCLIP