ZML_名称加载lora
Load LoRAs by name from another node — one editor, many samplers
- 模型
- CLIP
- 输出_模型
- 输出_CLIP
The killer feature of ComfyUI-ZML-Image's lora tooling is the "强力LoRA加载器" (Power Lora Loader) - a single node that stacks many LoRAs with toggles, trigger words, and per-LoRA text. But its superpower is wasted if every sampler in your graph needs its own copy of the same five LoRAs. ZmlNameLoraLoader is the follow-through: a plain loader that takes a list of names and weights as a string and applies them. Edit the list once, feed every model relay in the workflow, and all of them update together.
The README spells out the intended pattern: the Power Lora Loader has a LoRA名称列表 output (the names + weights of everything it has loaded), and you wire that straight into ZmlNameLoraLoader wherever you need a second sampler - a model relay, a detail pass, a hires-fix branch. You maintain your LoRA stack in one place and every downstream copy follows along.
How it works
- 模型 (MODEL) and CLIP (CLIP) - the base model pair to apply LoRAs to.
- LoRA名称列表 (STRING, force-input) - a JSON array of objects:
[{"lora_name": "my_lora.safetensors", "weight": 0.8}]. The Power Lora Loader emits exactly this shape, so normally you never type it - you connect the wire. It must be connected (it's forceInput), because the node expects a string from upstream rather than a text box.
Outputs are 输出_模型 and 输出_CLIP, the patched model and clip - wire them into your KSampler.
Execution is just a loop over the JSON: for each entry, resolve the file in ComfyUI's loras folder and apply it with comfy.sd.load_lora_for_models. Notable behaviors:
- Invalid JSON → the node prints a warning and returns the model unchanged, no crash. Nice for iterating, easy to miss if you're debugging silently.
- A
lora_nameof"None"ornull→ skipped. - Missing file → it raises an error. That's deliberate and worth knowing: the author added this so a LoRA that moved or got renamed fails loudly instead of silently doing nothing (the README's 2025.10 notes call this out as a fix).
When to reach for it
The relay workflow is the canonical case: generate, then run the result through a second sampler with the same LoRA stack. Without this node you either duplicate the whole stack in both loaders (and forget to update one) or build a fragile wiring hack. With it, the stack lives in one place.
A secondary use: drive LoRA selection programmatically - build the JSON list from another node (random weights, index-based selection from the pack's "path load" node) and this loader becomes a controllable LoRA swapper.
Install
Ships in ComfyUI-ZML-Image:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
# restart ComfyUI
or ComfyUI Manager → search "ComfyUI-ZML-Image". No extra dependencies beyond the pack baseline. Chinese-first UI - LoRA名称列表 is "LoRA name list" - translation patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.
Two honest gotchas. First, the silent-failure path: a mistyped JSON (a missing comma, a bad key) does nothing and just logs a warning - so when your LoRA stack "isn't working," check the console before the node. Second, weight is applied to both strength_model and strength_clip, so you can't independently set model vs. clip strength here - the sibling ZmlNunchakuNameLoraLoader has a similar single-weight design. Fine for 99% of use.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| 模型 | MODEL | — | |
| CLIP | CLIP | — | |
| LoRA名称列表 | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 输出_模型 | MODEL | — |
| 输出_CLIP | CLIP | — |