夜半-Krea2 LoRA 测试矩阵
The brute-force way to find the right Krea 2 LoRA strength
- model
- models
- prompts
- cell_labels
- strength_count
Before you start carving a Krea 2 LoRA into six functional areas, you should know what the thing is even worth at - and there's a fast, dumb, reliable way to find out. YebanKrea2LoraTestMatrix (夜半-Krea2 LoRA 测试矩阵) is the blunt sibling of the pack: point it at a folder full of LoRAs, give it a strength sweep, and it emits one patched model per LoRA × strength. No area routing, no analysis, just the classic "which strength looks right" grid.
How it works
Three required inputs: model (your Krea 2 MODEL), lora_folder (a dropdown of subfolders under models/loras), and prompt (multiline, used verbatim for every cell so your comparison stays clean). The strengths field is the interesting one - a comma-separated string like 0.6, 0.8, 1.0, 1.2 (that's the default), split into float values and capped at 16.
For every .safetensors file in the chosen folder, at every strength, it loads the LoRA with load_lora_for_models and pushes a patched model onto the models list. Semicolons work as separators too, if commas ever betray you. Each cell gets a label like my_lora | strength 0.80, and the number of strengths comes back as strength_count so downstream layout nodes know the grid width.
Outputs
models(list ofMODEL) - batch-sample these with a fixed seed and promptprompts(list ofSTRING) - the same prompt repeated per cell, wired into your batch sampler's conditioningcell_labels(list ofSTRING) - per-cell labelsstrength_count(INT) - how many strengths you swept, handy for grid layout
The natural downstream is the pack's YebanLoraTestXYZGrid: render the models, then feed images + cell_labels + a column count into the grid node for a labeled comparison sheet. It also pairs fine with any other XY-plot node you already trust.
Where it fits
This node is the warm-up act. The README's own workflow does exactly this: find the overall weight where a LoRA looks best with a simple sweep, and then move to the matrix loader and test controller for per-area tuning. Worth a couple of honest caveats though:
- It's a strength sweep, not a Krea 2 matrix tool. The name says "Krea2" because it's aimed at your Krea LoRA folder, but mechanically it will happily sweep any
.safetensorsLoRA on any model - it doesn't inspect blocks or areas at all. - "Best strength" from a sweep is only meaningful under one fixed prompt, seed and sampler. Change the seed and the winner can move. Keep the test conditions locked.
- The error you'll actually hit is
No LoRA files found in folderwhenlora_folderis empty - the dropdown only lists folders that currently exist, so if you've put a LoRA in a brand-new subfolder you may need to refresh ComfyUI's folder list first.
Install
Same pack as everything here:
cd ComfyUI/custom_nodes
git clone https://github.com/wsq194/yeban-krea2-lora-matrix.git Yeban_Krea2_Lora_Matrix
or install "Yeban Krea2 LoRA Matrix" from ComfyUI Manager, then restart. Needs ComfyUI ≥ 0.27.0 and frontend ≥ 1.45.20; no extra Python dependencies; Krea 2 model files required (UNET, Qwen3-VL encoder, Qwen-Image VAE); verified on Windows + CUDA so far.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| lora_folder | COMBO | 1 options: | |
| prompt | STRING | — | |
| strengths | STRING | 0.6, 0.8, 1.0, 1.2 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| models | MODEL | — |
| prompts | STRING | — |
| cell_labels | STRING | — |
| strength_count | INT | — |