Nodes/ComfyUI-ZML-Image/ZML_XY_LoRA加载器V2
ComfyUI Node

ZML_XY_LoRA加载器V2

The LoRA grid that also encodes each LoRA's own txt prompt — ZML_XY_LoRA加载器V2

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_XY_LoRA加载器V2
  • 模型
  • CLIP
  • 模型
  • 条件
  • 图表信息
LoRA文件夹路径E:\Models\Loras
LoRA数量3
LoRA权重数量2
权重起始值0.80
权重结束值1.00
无LoRA对比false
多行文本
txt联结方式全部内容
XY互换false

The V2 of ZML_XY_LoRA加载器 takes the V1 grid and adds the thing every anime-LoRA tester actually needs: each LoRA gets to bring its own trigger words. Instead of one shared prompt for the whole grid, each cell encodes with the LoRA's own .txt file - which is how you correctly test character/style LoRAs, because a style LoRA without its trigger tags is just a weight loss.

Mechanically it's the V1 sweep (folder path, LoRA数量, LoRA权重数量, weight start/end, 无LoRA对比, XY互换) plus prompt handling. The 多行文本 box is your global prompt template. Then txt联结方式 decides what happens with the per-LoRA txt:

  • 全部内容 (default) - the whole txt file's content is appended to your template
  • 每行独立 - each line of the txt becomes its own conditioning; a three-line trigger file produces three separate conditions for that cell, tripling the runs

The per-LoRA txt is looked up in the pack's established convention: first zml_w/... the subfolder zml next to the LoRA (the author's LoRA-loader ecosystem reads zml/<name>.txt), falling back to a same-named .txt in the LoRA's own directory. This is the same "text block" philosophy the whole pack is built on - the README's origin story is literally about storing prompts with LoRAs.

CLIP is required here (unlike V1, where it's optional) because the node does the text encoding itself. Outputs: 模型 (MODEL list), 条件 (CONDITIONING list - already-encoded positive conditioning, one per cell), and 图表信息 for the grid drawer. So the V2 loaders can feed a sampler directly with the conditioning pre-encoded, which is a different wiring pattern than V1 (where you still needed a separate CLIP text encode for the prompt).

Installing it

Ships in ComfyUI-ZML-Image. ComfyUI Manager → ComfyUI-ZML-Image, or:

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

Restart. No extra downloads. Chinese UI; English patch at https://github.com/zml-w/ZZZ_ZML_English_Patch. Also check the pack's companion repo (ZML-Image-Script) if you want the batch tool that pre-downloads txt/log/preview files for LoRAs - the README points there.

Common issues

The two failure modes worth planning for are both prompt-related. First, if a LoRA has no txt file at all, that cell just gets your 多行文本 template - which is fine, but it makes the grid inconsistent: some cells have trigger tags, some don't, and the comparison is apples-to-oranges. Standardize your txt files before running a serious sweep. Second, 每行独立 multiplies runs fast: 3 LoRAs × 2 weights × a 3-line trigger file is 18 conditions. That's usually exactly what you want, but it's also how you accidentally schedule a 40-minute grid. Set 无LoRA对比 on to get a baseline, and watch your math.

The E:\Models\Loras default path bites again here - it's a leftover from the author's machine. And the same sorted-folder caveat as V1 applies: LoRA数量 takes the first N files alphabetically. This node is the middle child of the family; V3 simplifies weights to a single value in exchange for a fixed-prompt + variable-prompt system. Read the V3 page before you pick.

Categoryimage/ZML_图像/XYZ

Inputs (11)

NameTypeDefaultDescription
模型MODEL
CLIPCLIP
LoRA文件夹路径STRINGE:\Models\Loras
LoRA数量INT3
LoRA权重数量INT2
权重起始值FLOAT0.80-10–10
权重结束值FLOAT1.00-10–10
无LoRA对比BOOLEANfalse开启后,会额外跑一次没有LoRA的图,多个权重时不会重复生成无LoRA的图。比如LoRA数量3,权重数量2,那就是2*3=6次有LoRA图,无LoRA的图跑一次,剩下的一个通过复制图像来生成。总共跑2*3+1=7张图。
多行文本STRING
txt联结方式COMBO全部内容每行独立是将txt里的每一行都独立输出,如果txt里有三行提示词,那就会输出三份条件
XY互换BOOLEANfalse

Outputs (3)

NameTypeDescription
模型MODEL
条件CONDITIONING
图表信息ZML_GRID_INFO