Save Checkpoint MXD
Save Checkpoint keeps crashing on fp8 CLIP? This is the fix
- model
- clip
- vae
If you've ever tried to save a merged or finetuned checkpoint whose text encoder is fp8 or otherwise quantized, you've probably met this error: empty() received an invalid combination of arguments - got (list, dtype=torch.dtype, device=FakeDevice). It's a real ComfyUI bug, it's infuriating because your model is fine, and Save Checkpoint MXD exists specifically to fix it. It's a drop-in replacement for the core Save Checkpoint node with a patched save path, and nothing else about your workflow needs to change.
What's actually crashing
ComfyUI's checkpoint saver builds the CLIP state dict out of "lazily-cast" weight objects. The whole point of those is to defer materializing weights until safetensors actually asks for them - so the object's .device property returns a fake placeholder object rather than a real device. That's fine until comfy.diffusers_convert.cat_tensors(), which stitches the split q/k/v weights of an SD1/SD2/SDXL CLIP back into single tensors, reads tensor.device and tensor.dtype before any .to() call has materialized the weight. PyTorch then gets handed that FakeDevice and dies on the spot. The bug only bites when the CLIP uses lazily-cast weights - quantized and fp8 text encoders being the usual suspects - which is why your checkpoint loads fine but refuses to save.
How the fix works
At import time, the Maxed Out pack replaces ComfyUI's cat_tensors with a version that resolves any lazy tensor to its real materialized form first - it checks whether each weight's .device is a genuine torch.device and forces a .to("cpu") if not, which is exactly what the lazy object's own override is designed to do. Then it concatenates normally. The node itself then calls the stock save routine with your model, clip, vae and filename_prefix, so the output format, subfolder handling and metadata embedding are all unchanged. You get the core save behavior, minus the crash.
Inputs
- model, clip, vae - the three objects from your loaders, wired in just like the core node.
- filename_prefix - defaults to
checkpoints/ComfyUI; include a subfolder likecheckpoints/my_mergeto keep things tidy.
There are no outputs - it's an output node; the job is done when it writes the file.
Installing
ComfyUI Manager → search "Maxed Out" → install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Maxed-Out-99/ComfyUI-MaxedOut.git
No pip dependencies. One note: because the fix patches ComfyUI at import, it's active globally once the pack is installed - you don't have to use this specific node to benefit, but using it guarantees the patched path runs.
Common issues
The usual save-node pitfalls still apply - make sure filename_prefix includes the checkpoints/ subfolder or your file lands in an unexpected spot, and don't expect it to fix a genuinely broken/truncated checkpoint. And if you're saving a model with a non-quantized CLIP, core's Save Checkpoint would have worked anyway; this node just costs you nothing.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| filename_prefix | STRING | checkpoints/ComfyUI | — |
Outputs (0)
No outputs