h4 - Model Save
Saving your merge before you lose it
- model
- clip
- vae
- saved_model_path
So you merged a model and it's good. Now what? A merged MODEL object only exists in memory - restart ComfyUI and it's gone. H4_ModelSave is the "make it real" button: it takes a MODEL, CLIP, and VAE triple and writes them to disk as a single .safetensors checkpoint, with your choice of precision and metadata. It's the natural finishing move after H4_ModelMerger, and it slots into the pack's model-merging family alongside the pruner.
How it works
Rather than hand-rolling checkpoint serialization, it delegates to ComfyUI's own save pipeline - the same state_dict_for_saving() machinery core ComfyUI uses, which means the saved file has proper key mapping for the model config. You give it the three pieces (MODEL, CLIP, VAE), it writes a checkpoint to your output folder (default prefix h4_Checkpoint_), and returns the full path as a string.
The save_dtype dropdown is where the real decisions live: auto keeps the original precision, float16/bfloat16 halve the size for most uses, and the float8_e4m3fn/float8_e5m2 options exist if you've got a recent enough GPU and PyTorch to load them. And save_meta controls whether workflow/author metadata gets embedded into the file - ComfyUI's whole culture of "the workflow lives in the PNG" extends to checkpoints here.
The inputs that matter
model,clip,vae- the triple. All required; wire them from a merger or from normal loaders.filename_prefix- base name for the file. Files get numbered to avoid clobbering.save_meta- embed metadata. On by default; the file gets bigger but you keep provenance.save_dtype- precision, as above.custom_metadata- optional freeform text to bake in alongside the rest.
The single output, saved_model_path, is worth wiring forward - the pack's H4_ModelPruner takes it as input for its fast "Raw File" mode, so Save → Prune is a natural chain.
Installing it
Same pack, same install:
cd ComfyUI/custom_nodes
git clone https://github.com/m3rr/h4_Live
# restart ComfyUI
or ComfyUI Manager → search "h4_Live." No extra dependencies.
Where it can bite you
Check the dtype before you hit save. If your loader was already fp16, auto is fine - but if you're running an fp8-quantized pipeline and tell it to save float32, you'll get a file several times bigger than the model you were using, with nothing gained. Float8 saves are the riskiest: the README and tooltip both flag that they need recent PyTorch/GPU support, and not every loader will read them back. And while the file lands in the output directory, ComfyUI's checkpoint loaders scan models/checkpoints - you may need to move or symlink it before a normal Checkpoint Loader sees it in its dropdown. Small gotcha, easy fix, but it trips people up the first time.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| filename_prefix | STRING | h4_Checkpoint_ | — |
| save_meta | BOOLEAN | true | — |
| save_dtype | COMBO | auto | The precision to save the model in. 'auto' keeps original precision. float16/bfloat16 recommended for most uses. float8 requires recent PyTorch/GPU support. |
| custom_metadataopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| saved_model_path | STRING | — |