Nodes/Save Checkpoint with Metadata/Save Checkpoint with Metadata
ComfyUI Node

Save Checkpoint with Metadata

A ComfyUI node in advanced/model_merging with 10 inputs and 4 outputs.

By a-l-e-x-d-s-9·Created 12 months ago·Updated 3 months ago· 0
Save Checkpoint with Metadata
  • model
  • clip
  • vae
  • clip_vision
  • ckpt_path
  • saved_metadata
  • saved_prompt
  • saved_extra_pnginfo
filename_prefixcheckpoints/CustomMeta
filename_modesmart_counter
metadata_json{}
metadata_modereplace
include_extra_pnginfotrue
prompt_override
Categoryadvanced/model_merging

Inputs (10)

NameTypeDefaultDescription
modelMODELMODEL to serialize into a .safetensors checkpoint. Wire your merged/trained model here.
filename_prefixSTRINGcheckpoints/CustomMetaSubfolder/prefix under output directory. Example: checkpoints/MyModel.
filename_modeCOMBOsmart_countersmart_counter: first save uses prefix.safetensors if free, later saves use prefix_00001_.safetensors. no_counter_overwrite: always write to prefix.safetensors and overwrite if it exists.
metadata_jsonSTRING{}JSON object of header keys to write. Values must be strings; non-strings are JSON-encoded for you. Example: {"author":"Alex","training":{"epochs":80}}
metadata_modeCOMBOreplacereplace: write only metadata_json. merge_minimal: start with prompt and optional EXTRA_PNGINFO, then apply metadata_json.
include_extra_pnginfoBOOLEANtrueMerge mode only. When ON, copy keys from hidden EXTRA_PNGINFO into the header before applying metadata_json.
prompt_overrideSTRINGOptional override for the hidden PROMPT. Ignored in replace mode. In merge_minimal mode, becomes the base prompt unless metadata_json also contains prompt.
clipoptCLIPOptional CLIP to embed into the saved checkpoint.
vaeoptVAEOptional VAE to embed into the saved checkpoint.
clip_visionoptCLIP_VISIONOptional CLIP_VISION to embed into the saved checkpoint.

Outputs (4)

NameTypeDescription
ckpt_pathSTRING
saved_metadataSTRING
saved_promptSTRING
saved_extra_pnginfoSTRING