Nodes/EasyLoRAMerger/🔧 Easy Component Extractor
ComfyUI Node

🔧 Easy Component Extractor

Grab the VAE, the Text Encoder, or Just the UNet

By Terpentinas·Created 7 months ago·Updated 4 months ago· 12
🔧 Easy Component Extractor
  • checkpoint_data
  • clip
  • vae
  • model
  • clip_data
  • vae_data
  • unet_data
  • clip_path
  • vae_path
  • unet_path
checkpoint
extract_cliptrue
extract_vaetrue
extract_modeltrue
precisionauto
deviceauto
save_triggerfalse
save_folder/tmp/ComfyUI/models/checkpoints
filename_prefixextracted

A checkpoint isn't one model - it's three bundled together: the UNet (or diffusion transformer) that does the denoising, the CLIP text encoder that turns your prompt into conditioning, and the VAE that translates between pixels and latent space. Sometimes you want one of those without the other two. Maybe you want a known-good VAE without dragging along the whole model. Maybe you want to merge just the UNets of two checkpoints and keep checkpoint A's text encoder. Easy Component Extractor is the tool for slicing that apart.

It's the front half of the extract → swap → combine workflow this pack supports end to end. And because it can re-cast precision while extracting, it's also a lazy person's way to get a single fp8 component without processing the whole checkpoint.

How it works

Pick a checkpoint from the dropdown (or feed a raw checkpoint_data from another node), and the three extract_* toggles decide what gets pulled out. extract_clip grabs the text encoder (both CLIP-L and CLIP-G on SDXL), extract_vae grabs the autoencoder, extract_model grabs the diffusion model itself. precision re-casts the output - auto keeps the source's native dtype, or force bfloat16, fp8_e4m3fn, etc. - and device picks CPU or GPU for the work.

What comes out is unusually generous. You get typed outputs (clip, vae, model) you can wire straight into a workflow, raw state-dict outputs (clip_data, vae_data, unet_data) for chaining into a Component Merger or Combiner, and with save_trigger on, saved file paths (clip_path, vae_path, unet_path) plus standalone .safetensors files named from filename_prefix - so extracted becomes extracted_clip.safetensors, extracted_vae.safetensors, and so on.

Inputs that matter

  • extract_clip / extract_vae / extract_model - flip off anything you don't need to save time and disk.
  • precision - the reason you'd pick this over a generic extractor.
  • save_trigger - off for pure in-graph use (just the typed and *_data outputs), on to write files.

Installing it

Same pack, same steps - Manager (search "Easy LoRA Merger") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Terpentinas/EasyLoRAMerger

Restart ComfyUI. No model downloads.

Gotchas

The *_data wires and the typed outputs are different things - the state dicts are what the merger and combiner want; the typed clip/vae/model are for live use. Don't cross them up. And if you extract only the VAE and then recombine a checkpoint with the VAE toggle off, you're building a checkpoint with no VAE, which most loaders will handle fine but your sampler won't. Keep the mental model of what you're assembling.

CategoryCheckpoint/Utils

Inputs (10)

NameTypeDefaultDescription
checkpointCOMBO1 options: None
extract_clipBOOLEANtrueExtract CLIP text encoder (both CLIP-L and CLIP-G for SDXL)
extract_vaeBOOLEANtrueExtract VAE (autoencoder decoder + encoder)
extract_modelBOOLEANtrueExtract UNet/diffusion model (the main denoising network)
precisionCOMBOautoOutput precision for extracted components. 'auto' preserves the checkpoint's native dtype.
deviceCOMBOauto3 options: auto, cuda, cpu
save_triggerBOOLEANfalseSave extracted components as standalone .safetensors files
checkpoint_dataoptCHECKPOINTChained state dict from another node (overrides dropdown)
save_folderoptSTRING/tmp/ComfyUI/models/checkpointsOutput folder for saved component files (leave empty for default checkpoints dir)
filename_prefixoptSTRINGextractedPrefix for saved filenames (e.g. 'my_model' → my_model_clip.safetensors)

Outputs (9)

NameTypeDescription
clipCLIP
vaeVAE
modelMODEL
clip_dataCHECKPOINT
vae_dataCHECKPOINT
unet_dataCHECKPOINT
clip_pathSTRING
vae_pathSTRING
unet_pathSTRING