ComfyUI Node

Omit Component

Merge everything except the VAE (or whatever you don't want touched)

By ljleb·Created 3 years ago·Updated about a month ago· 101
Omit Component
  • a (delta|param|weight)
  • component (param)
  • recipe
merge_checkpointingfalse

Omit Component (class Omit Component Mecha Recipe) is a filter. It takes a recipe and a component name, and removes every key that belongs to that component from the merge - so you can merge a model's UNet without touching its VAE, or swap in a new CLIP without dragging along the rest.

Model files aren't one blob. An SD1 checkpoint is really five components - the text encoder (clip_l), the UNet (diffuser), the VAE (vae), plus the EMA and scheduler weights - and a well-behaved merge often wants to leave some of them alone. The classic example: merging a model whose VAE you don't trust. If every merge you run silently overwrites your good VAE with a worse one, you want to strip that component out of the recipe entirely.

How it works

Mecha's model configs define which keys belong to which component. This node validates that the component you asked for actually exists in the config - try vae on an SD1 model and it's a match; type vawe and you get a clear error listing the valid components - then drops those keys from the merge. Keys that aren't in the component flow through untouched.

The inputs that matter:

  • a (delta|param|weight) (MECHA_RECIPE, required) - the recipe to filter. Works in any merge space.
  • component (param) - a string param naming the component to drop. For SD1-LDM the valid names are clip_l, vae, diffuser, ema, and scheduler; for SD3-style models you get clip_l, clip_g, t5xxl, vae, diffuser instead. You can feed a literal string or wire it from a String Mecha Hyper node.
  • recipe (output) - the input recipe minus that component, same merge space.

Note this is recipe-level filtering: you're editing the merge instructions, not the tensors. The stripped-out component simply isn't merged; when the result is merged and saved, whatever's missing falls back to the base model's values.

Install

Part of 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, look under mecha. The only declared dependency is sd-mecha==1.1.7; no models are downloaded by the pack.

Common issues

  • Typo in the component name → hard error. The error message lists valid components for the config, so it's a quick fix - but it's also the most common thing people hit here, since the node gives you a free-text field.
  • Not every config has every component. An SD1 LoRA in kohya format has different component names than an SD1 checkpoint. Check what config your recipe is actually in before you ask to omit a component that doesn't exist there.
  • Omit works on components, not individual tensors. If you want to surgically exclude one weird key (say a known-bad attention block), that's what Omit Non Finite or the regex-based Regex Weights nodes are for - Omit Component is a coarse, whole-part filter.

Pair it with its mirror image, Pick Component (keep only one component) and you can build merges that treat each part of the model separately - which is the whole trick behind component-weighted merging. For the most common case - "merge the UNet, leave the VAE alone" - this node is the cleanest one-line answer in the pack.

Categorymecha

Inputs (3)

NameTypeDefaultDescription
a (delta|param|weight)MECHA_RECIPE
component (param)MECHA_RECIPE
merge_checkpointingoptBOOLEANfalseSpeeds up an entire branch of a merge graph that does not change often in exchange of memory. - true: store the first output of this recipe node on cpu memory in fp16. On subsequent workflow executions, as long as the inputs do not change, the cached keys are returned after being cast to the original device and dtype. - false: do not store the output. The recipe and its inputs will re-execute on subsequent workflow executions. Note that the memory used to checkpoint the output is distinct from the cache feature. In general, you probably want to either use this *or* a cache unit, but not both at the same time because the memory adds up. The difference between merge checkpointing and cache is that merge checkpointing completely re-merges from scratch if any input changes. Merge checkpointing is also generally much faster than cache in the fast path.

Outputs (1)

NameTypeDescription
recipeMECHA_RECIPE