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

Save Diffusion Model with Metadata

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

By a-l-e-x-d-s-9·Created 12 months ago·Updated 3 months ago· 0
Save Diffusion Model with Metadata
  • model
  • model_path
  • saved_metadata
  • saved_prompt
  • saved_extra_pnginfo
filename_prefixdiffusion_models/CustomMeta
filename_modesmart_counter
metadata_json{}
metadata_modereplace
include_extra_pnginfotrue
prompt_override
Categoryadvanced/model_merging

Inputs (7)

NameTypeDefaultDescription
modelMODELMODEL to serialize into a .safetensors diffusion model file.
filename_prefixSTRINGdiffusion_models/CustomMetaSubfolder/prefix under output directory. Example: diffusion_models/MyModel.
filename_modeCOMBOsmart_countersmart_counter: first save uses prefix.safetensors if free, later saves use prefix_00001_.safetensors. no_counter_overwrite: overwrite prefix.safetensors.
metadata_jsonSTRING{}JSON object of safetensors header keys to write.
metadata_modeCOMBOreplacereplace: write only metadata_json. merge_minimal: include prompt/extra_pnginfo, then apply metadata_json.
include_extra_pnginfoBOOLEANtrueMerge mode only. Copy hidden EXTRA_PNGINFO keys before applying metadata_json.
prompt_overrideSTRINGOptional replacement for hidden PROMPT in merge_minimal mode.

Outputs (4)

NameTypeDescription
model_pathSTRING
saved_metadataSTRING
saved_promptSTRING
saved_extra_pnginfoSTRING