Nodes/Mecha Merge Node Pack/SDXL-KOHYA_BUT_DIFFUSERS_LYCORIS_LORA Components Params
ComfyUI Node

SDXL-KOHYA_BUT_DIFFUSERS_LYCORIS_LORA Components Params

Kohya checkpoint, diffusers UNet, LyCORIS LoRA

By ljleb·Created 3 years ago·Updated about a month ago· 101
SDXL-KOHYA_BUT_DIFFUSERS_LYCORIS_LORA Components Params
    • recipe
    vae0.00
    clip_l0.00
    clip_g0.00
    diffuser0.00

    Of all the Components Params nodes in comfy-mecha, this one has the longest name and arguably the least common use case - which is why it exists. The SDXL-KOHYA_BUT_DIFFUSERS_LYCORIS_LORA Components Params node handles a merge where the checkpoint is kohya-layout, the UNet keys are diffusers-style, and the LoRAs are LyCORIS networks (LoCon/LoHa). Three dialects, one config.

    It's a param node: it emits a MECHA_RECIPE of per-component weights rather than a merged model. Inputs:

    • diffuser - UNet (diffusers naming)
    • clip_l, clip_g - text encoders (kohya naming)
    • vae - autoencoder

    Feed the output into a merge method's (delta|param|weight) input - Add Difference is the one for applying LyCORIS LoRA deltas onto a checkpoint - and set anything to 0 to skip it.

    How it works

    The mechanism is identical across the family: each float becomes a literal per-key weight restricted to its component, then combined into one recipe. The node's whole value is that its config understands all three key dialects, so a LyCORIS LoRA, a diffusers UNet, and kohya text encoders can coexist in one merge without hand-mapping keys.

    Install

    Standard pack install: ComfyUI Manager → search "mecha" → Mecha Merge Node Pack, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ljleb/comfy-mecha.git
    pip install -r comfy-mecha/requirements.txt
    

    Restart ComfyUI. Dependency is just sd-mecha; no model files to fetch.

    Gotchas

    Let the name be your checklist. If your LoRAs are actually standard kohya LoRAs, step down to SDXL-KOHYA_BUT_DIFFUSERS_KOHYA_LORA; if the UNet is also kohya-named, drop the BUT_DIFFUSERS clause and use SDXL-KOHYA_LYCORIS_LORA. LyCORIS networks are worth getting right because their key structure differs from plain LoRA in ways that a wrong config will silently ignore - one reason people think a merge "did nothing" is that the LoRA clause didn't match the file they loaded.

    Categorymecha

    Inputs (4)

    NameTypeDefaultDescription
    vaeFLOAT0.00-18446744073709550000–18446744073709550000
    clip_lFLOAT0.00-18446744073709550000–18446744073709550000
    clip_gFLOAT0.00-18446744073709550000–18446744073709550000
    diffuserFLOAT0.00-18446744073709550000–18446744073709550000

    Outputs (1)

    NameTypeDescription
    recipeMECHA_RECIPE