SD1-KOHYA_KOHYA_LORA Components Params
Component weights for kohya-format LoRAs on SD1
- recipe
SD1-KOHYA_KOHYA_LORA Components Params (class SD1-KOHYA_KOHYA_LORA Defaults Hyper) is the per-component weight node for kohya-format LoRAs on SD1 - the config mecha uses when you're merging a LoRA written in kohya's lora_* naming. It takes the same three inputs as the kohya checkpoint node - clip_l, diffuser, vae - and emits a param recipe that applies per-part weights to the LoRA merge.
This is the node you reach for in the most common merge of all: folding a trained LoRA into an SD1 base. A LoRA isn't a single scalar - it has a text-encoder branch and a UNet branch, and trainers let you control that split (kohya's network_train_text_encoder / network dimension split settings). This node is the mirror of that control at merge time: you decide how much of the LoRA's CLIP part lands versus its UNet part, without touching the other.
How it works
sd-mecha registers auxiliary configs for LoRA/LyCORIS layouts on top of each base config. This one is sd1-kohya_kohya_lora - a kohya-format LoRA (lora_te_*, lora_unet_* keys) whose base model uses kohya naming. The node maps your three floats onto that config's components and ORs them into one param recipe, exactly like the other components params nodes. The engine then looks up the per-component weight per key during the merge.
The inputs that matter:
- clip_l - weight for the LoRA's text-encoder tensors.
- diffuser - weight for the LoRA's UNet tensors.
- vae - weight for any VAE-side tensors in the LoRA (usually none for typical LoRAs; it's there for completeness).
- recipe (output, param space) - combined param for the
sd1-kohya_kohya_loraconfig.
The mental model: "I want the style/character's UNet influence at full strength but its text-encoder tagging influence at 40%." Set diffuser: 1, clip_l: 0.4, wire it into the alpha of an Add Difference (or the weight input of Weighted Sum) whose two inputs are base + LoRA, and the merge does exactly that.
Install
It ships in the Mecha Merge Node Pack (ljleb/comfy-mecha):
- ComfyUI Manager → Install Custom Nodes → search "mecha" → Mecha Merge Node Pack, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ljleb/comfy-mecha.git
pip install -r comfy-mecha/requirements.txt
Restart ComfyUI. Only dependency is sd-mecha==1.1.7; no model downloads.
Common issues
- Use it with LoRA-space recipes. If the thing you're merging landed in a different config (a LyCORIS network, or a kohya base with different key prefixes), the component names won't match - the pack has a separate node for the LyCORIS layout (
SD1-KOHYA_LYCORIS_LORA), so pick the one that matches whatMecha Lora Recipeactually loaded. - 0 = no override, not "skip the CLIP." Per-component params modulate the method's weight; they don't omit tensors. For a hard exclusion,
Omit Componentis the surgical tool. - Most LoRAs are UNet-heavy anyway. Text-encoder-only LoRAs exist but are rarer; if your LoRA has no
clip_ltensors at all, that input simply has nothing to act on.
The subtlety in this family of nodes is just picking the right config. Once you do, per-component LoRA strength is one of the most satisfying knobs in the pack - it's how you make a LoRA "fit" a merge instead of just turning its overall weight up and down.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_l | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| diffuser | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
| vae | FLOAT | 0.00-18446744073709550000–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| recipe | MECHA_RECIPE | — |