ComfyUI-PNGInfo Introduction
ComfyUI-PNGInfo brings an A1111-style “PNG Info” experience to ComfyUI. It helps you understand the information saved inside generated images and Safetensors model files without having to read raw workflow data or model metadata yourself.
With its three nodes, you can:
- Read an image’s generation settings, including prompts, seed, steps, and CFG scale when those values are available.
- Reuse key settings in a workflow through separate output connections.
- Inspect Safetensors metadata to learn more about a checkpoint, LoRA, or VAE without loading its weights.
- Clean metadata before sharing a model, such as merge history or local file paths you do not want to distribute.
These tools are useful when you want to revisit how an image was made, examine information stored in a model file, or prepare a Safetensors file for sharing.
How ComfyUI-PNGInfo Works
Metadata is information stored alongside an image or model file. Think of it as a note attached to the file: the image or model is the main work, while the note may describe how it was created.
For images, PNG Info (Readable) looks for saved generation information. It understands A1111-style parameters text and ComfyUI’s embedded workflow JSON. For a ComfyUI workflow, the node examines the saved graph and makes a best-effort attempt to work backward to useful details, such as KSampler settings, model and LoRA names, and resolution. Because it is reconstructing those details from the workflow, not every value will necessarily be available.
For Safetensors files, the extension reads metadata without loading the model’s weight data into memory. The readable-info node presents that metadata as text. The cleaner uses your chosen rules to remove metadata and save a cleaned file; it handles the weight data by streaming the file rather than unpacking the weights into memory.
ComfyUI-PNGInfo Features
PNG Info (Readable)
This node reads an image and makes its available generation information easier to inspect. It also passes the image through so you can continue using it elsewhere in your workflow.
| Output | Type | What you can use it for |
|---|---|---|
image | IMAGE | Continue working with the input image. |
info | STRING | Read a human-friendly summary in the style of A1111’s PNG Info. |
positive / negative | STRING | Reuse the available positive and negative prompts. |
seed / steps | INT | Reuse the available seed and step count. |
cfg | FLOAT | Reuse the available CFG scale. |
To display the info text on screen, connect it to a showAnything-style node, such as one provided by easy-use or pythongosssss. For example, you could inspect an older image’s settings, then connect its seed output to another part of your workflow instead of typing the number again.
The node supports both A1111-style image metadata and ComfyUI-style embedded workflows. Its reconstruction of ComfyUI settings is best-effort: the information it can show depends on what the image contains.
Safetensors Info (Readable)
This node lets you inspect metadata in a Safetensors checkpoint, LoRA, or VAE without loading the model weights.
| Output | Type | What it contains |
|---|---|---|
info | STRING | Metadata arranged as readable text, such as training settings or merge information when present. |
json | STRING | The metadata as a raw JSON string. |
This can help you check training information in a LoRA made with a tool such as Kohya_ss, or review a merged model’s merge recipe if one was saved in its metadata. The json output is available when you need the underlying metadata rather than the formatted summary.
Safetensors Metadata Cleaner
This node removes selected metadata from a Safetensors file and saves the result. It is particularly useful before sharing a model that may contain merge history, hashes, or file paths from your computer.
| Setting | What it does |
|---|---|
remove_all_metadata | When True, removes all existing metadata. When False, allows selective removal using remove_keys_by_regex. |
remove_keys_by_regex | Matches metadata keys to remove. Its default pattern, .*path.*|.*hash.*, targets keys containing path or hash. |
overwrite | When True, cleans the input file in place and ignores save_name. |
save_name | Names the saved result when you are not overwriting the input file. |
custom_path | Accepts a file path, including a STRING path output from a compatible save node. |
custom_metadata_json | Adds metadata you provide as JSON, such as copyright information or your own descriptive fields. |
For example, if you want to keep useful LoRA metadata while removing keys associated with paths and hashes, set remove_all_metadata to False and use the default remove_keys_by_regex pattern. If you want none of the existing metadata retained, set remove_all_metadata to True.
Check your choices before overwriting. overwrite=True changes the input file directly. If you may need its original metadata later, keep a separate copy.
Clean a model immediately after saving it
You can connect the cleaner to an existing model-save node if that node outputs the saved file’s path as a STRING:
- Connect the save node’s path output to the cleaner’s
custom_path. - Set the cleaner’s
overwriteoption toTrue. - Choose whether to remove all metadata or only keys matching your pattern.
- Run the workflow. The cleaner processes the file after the save node produces its path, without creating an unnecessary intermediate model file.
A large model may take several seconds or tens of seconds to copy or overwrite. During that operation, ComfyUI may temporarily appear unresponsive because the processing runs synchronously. It should respond again when the operation finishes.
ComfyUI-PNGInfo Models
ComfyUI-PNGInfo does not provide separate AI models for generating images. Its Safetensors tools work with model files you already have, including checkpoints, LoRAs, and VAEs:
- Checkpoints: Inspect saved metadata or remove information you do not want included when sharing a checkpoint.
- LoRAs: Look for saved training settings, or selectively clean metadata while retaining information you find useful.
- VAEs: Inspect or clean metadata in a Safetensors VAE file.
The extension’s tools read or change metadata. They do not offer alternate generation models or model-quality settings.
What’s New with ComfyUI-PNGInfo
The provided documentation marks two nodes and one option as new, but does not give version numbers or a dated change history:
- Safetensors Info (Readable) adds a way to inspect model-file metadata without loading the weights.
- Safetensors Metadata Cleaner adds rules for removing all metadata or only keys that match a pattern, as well as the ability to add custom JSON metadata.
- The cleaner’s
overwriteoption lets you clean an existing file directly. Combined withcustom_path, it can process the file produced by a compatible model-save node as part of the same workflow.
Troubleshooting ComfyUI-PNGInfo
I connected info, but I cannot see the text on the canvas
- Connect the
infooutput to ashowAnything-style display node. - Run the workflow.
- Read the formatted text in that display node’s output.
The info connection carries text; it does not display that text by itself.
Some image settings are missing or do not match what I expected
- Check whether the image contains A1111
parameterstext or an embedded ComfyUI workflow. - If it contains a ComfyUI workflow, remember that the node reconstructs settings from the saved graph on a best-effort basis.
- Use the values that are available, and verify important settings against the original workflow when you still have it.
ComfyUI looks frozen while cleaning a large model
- Allow the operation time to finish, especially for files several gigabytes in size.
- Wait for ComfyUI to become responsive again before starting another operation.
Temporary unresponsiveness during a large copy or overwrite is described by the author as expected behavior for this node.
Metadata I wanted to keep was removed
- Review whether
remove_all_metadatawas set toTrue. - To remove only selected entries, set it to
False. - Review
remove_keys_by_regex: it matches metadata key names, and the default pattern targets keys containingpathorhash. - When testing a rule you are unsure about, retain a copy of the original file instead of overwriting it.
Frequently Asked Questions
Does reading Safetensors metadata load the whole model?
No. Safetensors Info (Readable) reads metadata without loading the weight data.
Can I use the cleaner after an existing checkpoint or LoRA save node?
Yes, if that node provides the saved file path as a STRING output. Connect that output to custom_path and set overwrite to True.
Can I add my own information to the saved model?
Yes. Enter the metadata you want to add as JSON in custom_metadata_json.
Does overwrite=True use save_name?
No. In overwrite mode, the cleaner processes the input file directly and ignores save_name.
Learn More about ComfyUI-PNGInfo
Visit the ComfyUI-PNGInfo project repository for the author’s project information and updates.
