ComfyUI Node

XLoraGet

An ordered LoRA stack, applied from XDataHub's sidebar

By Xz3r0-M·Created 8 months ago·Updated about 6 hours ago· 13
XLoraGet
  • model
  • clip
  • model
  • clip
  • trigger_words
  • lora_info
lora_stack[]

Stacking LoRAs in ComfyUI is fiddly - you chain LoraLoader nodes, keep track of which strength applies to model vs. CLIP, and pray the order you want is the order you built. XLoraGet is the XDataHub-flavored alternative: the frontend hands it a serialized LoRA list (ordered, with per-entry strengths and trigger words), and the node applies them in sequence to your model and CLIP in a single pass. The pack's author credits ComfyUI-Lora-Manager for inspiration, and you can feel it - this is the "LoRA stack manager, but it lives in the panel" experience.

How it works

You connect model (MODEL) and optionally clip (CLIP). The lora_stack input is a serialized JSON string the XDataHub frontend builds for you - you don't hand-write it. Under the hood the node parses the stack into entries, then for each active entry:

  • resolves the LoRA name (from the name or from a lora_ref if only a reference is present - missing LoRAs are skipped with a warning, not fatal),
  • reads strength_model and strength_clip (if no CLIP is connected, clip strength is forced to 0),
  • applies via comfy.sd.load_lora_for_models in stack order.

Order matters for LoRAs the same way it matters for the built-in chain - later applications composite onto earlier ones - so "ordered list" is the whole point of this node. Entries with both strengths at 0 are skipped, and the pack keeps a local trigger-word database so each LoRA's trigger words can be collected automatically.

Outputs

  • model - the model with the stack applied, in order.
  • clip - the CLIP with the stack applied (only if you passed one in).
  • trigger_words - the enabled trigger words from active LoRAs, joined into a comma-separated string, ready to prepend to your prompt. This is the quietly valuable output - it turns "I have no idea what token activates this LoRA" into a string you can shove straight into CLIP Text Encode.
  • lora_info - a plain-text summary of which LoRAs were applied, in what order, at what strength. Perfect for logging to XDataSave or inspecting what actually ran.

Installing it

Part of ComfyUI-Xz3r0-Nodes. ComfyUI Manager: search ComfyUI-Xz3r0-Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Xz3r0-M/ComfyUI-Xz3r0-Nodes.git
cd ComfyUI-Xz3r0-Nodes
pip install -r requirements.txt

Restart ComfyUI. LoRA loading uses ComfyUI's built-in machinery, so no extra dependencies.

Gotchas

The honest caveat is that this is an XDataHub node: the lora_stack is populated by the panel's frontend, so if you're not using XDataHub you're hand-rolling JSON into a field that warns you not to. And the "skip missing LoRA with a warning" behavior is a double-edged sword - it keeps a batch alive when a file's gone, but it also means a silently-missing LoRA can produce output that doesn't match your stack; check lora_info before trusting the result. The KB's LoRA guidance applies as ever: strengths are where people push too hard, and 0-strength entries here are skipped entirely rather than neutral - disable, don't zero.

Category♾️ Xz3r0/XDataHub

Inputs (3)

NameTypeDefaultDescription
modelMODELBase model to apply LoRAs
lora_stackSTRING[]Serialized LoRA stack from frontend
clipoptCLIPOptional CLIP input

Outputs (4)

NameTypeDescription
modelMODELModel with ordered LoRAs applied
clipCLIPClip with ordered LoRAs applied
trigger_wordsSTRINGEnabled trigger words from active LoRAs
lora_infoSTRINGApplied LoRA order and strength summary