Text Encoder
Merge text encoders on their own — the half of a model merge everyone forgets
- recipe
Everyone obsesses over the UNet weights when they merge, and the text encoder is usually just carried along as part of the checkpoint. But sometimes the encoder is exactly what you want to change. Maybe one of your merge parents has a noticeably better CLIP, or you're swapping between SDXL's CLIP-L/CLIP-G pair and a single Qwen text encoder from the newer anime models. That's what this node is for: a loader that pulls a .safetensors from your models/text_encoders folder and hands it to comfy-mecha as a MECHA_RECIPE, scoped to nothing but that folder.
It's the sibling of this pack's Diffusion Model loader and does the same one job in a different place. comfy-mecha's stock Model node reads checkpoints and ModelAny scans several folders; this one is strict about text_encoders, which matters more than it used to now that modern architectures ship the encoder as a separate file. Anima, for instance, runs on a Qwen3-0.6B text encoder stored independently of the diffusion model - if you're merging Anima fine-tunes you'll often want to blend encoders separately too.
How it works
One call under the hood: sd_mecha.model(model_path, config=..., merge_space=...), wrapped in a recipe. The node doesn't do any merging itself - it produces a MECHA_RECIPE that you wire into comfy-mecha's merge nodes, with the actual blend and the conversion back to a ComfyUI model happening in Merger. Think of it as an ingredient loader, not a merge node.
The inputs that matter
- model_name - dropdown of every
.safetensorsinmodels/text_encoders. That's the whole selection UI. - model_config -
autolets sd-mecha figure out the base from the file. If it can't identify the encoder (or you want a specific one), pick an explicit base config likesdxl-sgmhere. - merge_space - leave it on
default; it maps to sd-mecha'sweightspace, which is right for ordinary weighted mixing.
The output is recipe of type MECHA_RECIPE. It is not a usable model - don't try to connect it to a CLIP loader or a sampler. It feeds comfy-mecha's recipe inputs (like the parents of WeightedSum), and Merger turns the result into something ComfyUI can actually use.
Installing it
This is the last node of the pack, so the setup is identical: install comfy-mecha first, then:
cd ComfyUI/custom_nodes
git clone https://github.com/jupo-ai/comfy-mecha-utils
Restart ComfyUI. ComfyUI Manager can do it in one step (search "comfy-mecha-utils"), and since the pack is on the Comfy Registry it pulls its one pip dependency, sd-mecha, for you. No model files to download, no API key.
Common issues
Same two traps as the rest of the pack: forgetting to install comfy-mecha itself (you'll find the recipe with nowhere to plug it in), and treating the MECHA_RECIPE output as a model. If auto config fails on an unusual encoder file, set an explicit config rather than fighting the detection. One more honest caveat: mixing encoders across architectures - say CLIP and Qwen - generally doesn't produce anything useful, so this node's sweet spot is blending encoders that share a base, like two SDXL CLIP pairs or two Anima Qwen encoders.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 0 options: | |
| model_configopt | COMBO | auto | 11 options: auto, singleton-mecha, sdxl-kohya, sdxl-kohya_but_diffusers, sd1-kohya, sdxl-sgm, +5 |
| merge_spaceopt | COMBO | default | 4 options: default, weight, delta, param |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| recipe | MECHA_RECIPE | — |