Model Save KJ
Bake a patched or merged diffusion model to disk
- model
You did a merge, or stacked some patches onto a model in-graph, and now you want that result as an actual file you can load next time instead of rebuilding the graph every run. ModelSaveKJ writes the MODEL currently flowing through your graph out to a safetensors on disk. Think of it as "save my in-memory diffusion model," and it's the one you reach for when you're working with the modern split-model checkpoints (Flux, Qwen, the video models) rather than the old all-in-one SD checkpoints.
It's part of Kijai's KJNodes. Kijai is one of the most trusted names in the ComfyUI ecosystem - the person the community leans on for fp8 conversions of brand-new models and for wrappers like WanVideoWrapper - so a save node from this pack that gives you control over the weight-key naming isn't an accident. That control is the point.
How it works and why it's not just "Save Checkpoint"
Core ComfyUI has a Save Checkpoint node, but it bundles the diffusion model, VAE, and text encoder into one legacy-style .ckpt/.safetensors. That format is a poor fit for today's models, where you load a bare diffusion_model file separately from its VAE and text encoders. ModelSaveKJ saves just the diffusion model - and lets you set the prefix on every weight key in the state dict, which is what makes the file load back cleanly as a standalone diffusion model.
The inputs that matter
model(MODEL) - the model you want to save. This is whatever comes out of your merge/patch chain.filename_prefix(defaultdiffusion_models/ComfyUI) - where it lands and what it's called, as a path prefix under your ComfyUI models/output tree. ChangeComfyUIto something descriptive so you don't overwrite yesterday's merge.model_key_prefix(defaultmodel.diffusion_model.) - the prefix stamped onto every tensor key. Leave this at the default unless you specifically know a target loader expects different key names. Getting this wrong is the usual reason a saved file won't load later.
This is an output node - it has no outputs to wire onward. It's the end of the branch; its job is the file on disk. Watch the ComfyUI console when it runs; it prints the exact path it wrote to.
How to install it
Via ComfyUI Manager, search KJNodes for ComfyUI, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-KJNodes
pip install -r ComfyUI-KJNodes/requirements.txt
then restart (portable users run the pip step through python_embeded\python.exe). Nothing heavy to download - the pack keeps dependencies minimal.
Common issues & troubleshooting
The saved file won't load anywhere. Almost always a model_key_prefix mismatch. The default model.diffusion_model. matches how ComfyUI's own loaders expect the keys; if you changed it to experiment, put it back. When in doubt, save with the default and load with the standard diffusion-model loader.
Where did the file go? It follows filename_prefix relative to your ComfyUI models/output directory. The default diffusion_models/ComfyUI writes into your diffusion_models folder. Read the console line it prints if you can't find it - that's the ground truth.
The file is smaller than the checkpoint I loaded. Expected. It's only the diffusion model - no VAE, no CLIP/text encoder. You load those separately, same as you did to build the graph in the first place. If you wanted an everything-in-one file, this is the wrong node.
It's huge and slow to write. Also expected for a full diffusion model, especially fp16. If you're iterating on merges, save fp8 upstream or don't save on every run - bake to disk once you've settled on a recipe.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| filename_prefix | STRING | diffusion_models/ComfyUI | — |
| model_key_prefix | STRING | model.diffusion_model. | — |
Outputs (0)
No outputs