Nodes/ComfyUI-ZML-Image/ZML_LoRA加载器_五
ComfyUI Node

ZML_LoRA加载器_五

Stack five LoRAs in one node, trigger words included

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_LoRA加载器_五
  • 模型
  • CLIP
  • 输出_模型
  • 输出_CLIP
  • txt_内容
lora_1_名称
权重_1_强度1.00
lora_2_名称
权重_2_强度1.00
lora_3_名称
权重_3_强度1.00
lora_4_名称
权重_4_强度1.00
lora_5_名称
权重_5_强度1.00

Stacking LoRAs is normal - five is more than most workflows use, but the shape of the problem is standard. ZmlLoraLoaderFive (ZML_LoRA加载器_五) is a five-slot LoRA combiner: pick up to five LoRAs, set a weight for each, and it applies them all in sequence to your model and CLIP in one node. No chaining five separate loaders together, no spaghetti.

The inputs are the boring-but-solid part: an optional 模型 and CLIP, then five pairs of lora_1_名称/权重_1_强度 through lora_5_名称/权重_5_强度. Each name is a dropdown over your models/loras folder (with None as the "skip this slot" option), each weight is a float from -10 to 10 defaulting to 1.0. Leave a slot at None and it's just skipped. Outputs are 输出_模型 and 输出_CLIP with everything applied, plus a txt_内容 string.

That third output is the ZML signature move. The pack's LoRA convention stores a same-named .txt file (the trigger words) in a zml subfolder next to each LoRA - models/loras/zml/111.txt for 111.safetensors, inherited from the pysss "LoRA loader" convention the README credits. When this node loads a LoRA, it looks for that txt and concatenates the trigger words of every active LoRA into txt_内容, comma-separated. So you get "the LoRAs applied" and "the words you should put in your prompt" in one run. Wire txt_内容 into your positive prompt and you've closed the loop between LoRA and trigger words without keeping a notebook.

Mechanically it's the standard comfy.sd.load_lora_for_models(model_out, clip_out, lora, weight, weight) chain, applied slot by slot - so the ordering matters in the way LoRA stacking always matters (later slots apply on top of earlier ones, and total strength compounds). Errors per-slot are caught and printed to the console, so one broken LoRA doesn't kill the whole chain; you'll just get a missing txt_内容 entry and a log line.

Where beginners get caught: the txt_内容 output is empty (or shorter than expected) if the LoRAs don't have zml-sidecar txt files - the node reads only that convention, not LoRA metadata embedded in the safetensors. And if you want the trigger words to be useful, keep the txt files tidy; the node just dumps whatever's in them. Also worth noting: everything is optional, so an entirely empty node returns your model and CLIP untouched - a handy "bypass" state, but easy to confuse with "it loaded my LoRA" when it didn't.

Install the pack once:

cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image

or via ComfyUI Manager (search "ComfyUI-ZML-Image"), then restart. It lives under ZML 图像 → lora加载器. No extra dependencies beyond what the pack ships. If you never stack more than two LoRAs and you don't care about the trigger-word sidecar, the plain official loader is simpler - this node earns its keep when you're doing character + style + quality LoRAs together, which is the exact crowd this pack was built for.

Categoryimage/ZML_图像/lora加载器

Inputs (12)

NameTypeDefaultDescription
模型optMODEL
CLIPoptCLIP
lora_1_名称optCOMBO1 options: None
权重_1_强度optFLOAT1.00-10–10
lora_2_名称optCOMBO1 options: None
权重_2_强度optFLOAT1.00-10–10
lora_3_名称optCOMBO1 options: None
权重_3_强度optFLOAT1.00-10–10
lora_4_名称optCOMBO1 options: None
权重_4_强度optFLOAT1.00-10–10
lora_5_名称optCOMBO1 options: None
权重_5_强度optFLOAT1.00-10–10

Outputs (3)

NameTypeDescription
输出_模型MODEL
输出_CLIPCLIP
txt_内容STRING