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

SDXL-DIFFUSERS_UNET_ONLY Components Params

The one-slider param node for SDXL UNets that live in a diffusers folder

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

    Some SDXL models never come as one big checkpoint. They arrive as a Hugging Face diffusers folder, split into text_encoder/, text_encoder_2/, vae/, and unet/, and the part people actually merge is the unet. This node, the SDXL-DIFFUSERS_UNET_ONLY Components Params node from comfy-mecha, is the version of the Components Params family built for exactly that: a UNet in diffusers naming, nothing else.

    It's about as minimal as a mecha node gets. Where the SGM variant gives you five sliders (UNet, both CLIPs, VAE, scheduler), this one has a single input:

    • diffuser - the weight to apply to the UNet component.

    That's the whole input list. Set it, and you get a MECHA_RECIPE that carries just that one component's weight. Plug it into the (delta|param|weight) input of a merge method (Weighted Sum, Add Difference, whatever you're running) and only the UNet part of the merge is affected.

    Why you'd reach for it

    Two reasons. The narrow one: your merge involves a diffusers-folder UNet - maybe you're blending two unet/ folders, or adding a delta to a model that was saved in diffusers layout. The broader one: sometimes you only want to merge the UNet and leave text encoders and VAE completely alone, and a param recipe restricted to the UNet is the cleanest way to express that. Set diffuser to 1.0 and the merge is "take the other model's UNet entirely, keep everything else from A."

    How it works

    Mechanically it's identical to the rest of the Components Params nodes: the float becomes a literal per-key weight, restricted to the diffuser component of the sdxl-diffusers_unet_only config, returned as a MECHA_RECIPE. The output goes into a merge recipe node; the final step is always Mecha Merger, which turns the recipe into an actual MODEL/CLIP/VAE.

    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 after. The only dependency is the sd-mecha library; there are no model files to fetch.

    Gotchas

    The "UNET_ONLY" is doing real work: this config describes diffusers' unet key naming, which differs from both the SGM layout and the kohya layout. If your UNet weights use kohya naming you'll want the SDXL-KOHYA or SDXL-KOHYA_BUT_DIFFUSERS variant instead - the pack ships a node per dialect so you can stop guessing at key formats. And remember this node is a param producer, not a merger; if you've wired it directly into Mecha Merger with nothing else, that's not a recipe yet.

    Categorymecha

    Inputs (1)

    NameTypeDefaultDescription
    diffuserFLOAT0.00-18446744073709550000–18446744073709550000

    Outputs (1)

    NameTypeDescription
    recipeMECHA_RECIPE