comfy-metadata
FreeRuns bundled scriptsNot checkedExtract/analyze ComfyUI metadata embedded in output files - PNG tEXt, WebP EXIF, MP4/WebM container, .latent safetensors. Use when figuring out what…
by laurigates★ 61 GitHub starsAbout this skill
ComfyUI output metadata
Every image/video/audio file ComfyUI emits embeds the API-form prompt and the UI-form workflow that produced it. The encoding varies by file format and by which save-node wrote it (core vs. kijai vs. VHS). This skill is the canonical reference for where the data lives, how to read it back, and a small Python toolkit to do it reliably across every format on disk in this install.
When to Use This Skill
| Use this skill when... | Use instead when... |
|---|---|
| Figuring out what prompt/settings produced an existing output file | Inspecting a live in-graph value during a run -> comfy-debug-preview |
| Scanning, organizing, or comparing a directory of outputs | Auto-arranging the layout of a workflow JSON -> comfy-workflow-layout |
Quick reference
| Format | Saved by | Where the JSON lives | Encoding |
|---|---|---|---|
| PNG still | core SaveImage, kijai PNG path |
tEXt chunks (PIL Image.info["prompt"] and ["workflow"]) |
each value is a JSON string |
| Animated PNG | core SaveAnimatedPNG |
iTXt chunks (same keys) |
each value is a JSON string |
| WebP still + animated | core SaveAnimatedWEBP |
EXIF tags: 0x0110 (Model) holds "prompt:<json>", 0x010F (Make) holds "workflow:<json>", lower tags hold further extra_pnginfo keys |
one EXIF string per key, "key:json" prefix |
| MP4 native | core SaveVideo |
Container metadata, separate keys: prompt, workflow, plus any extra |
each value is a JSON string |
MP4 kijai (WanVideoWrapper_*.mp4) |
WanVideoWrapper.save_video |
Container metadata, single key comment |
one JSON object: {"prompt": "<json>", "workflow": "<json>"} (double-encoded) |
| WebM / Matroska | core SaveVideo; kijai/MMAudio |
Container metadata: per-key (native) or single COMMENT (kijai) |
same patterns as MP4 |
| FLAC / OGG / MP3 / WAV | core SaveAudio |
Container metadata: prompt, extra_pnginfo* keys |
each value is a JSON string |
.latent |
core SaveLatent |
safetensors header metadata: prompt, workflow |
each value is a JSON string |
The library handles all of these uniformly. See REFERENCE.md for code
anchors, exact byte-level details, and edge cases (the _create_webp_metadata
EXIF tag walk, extra_pnginfo keys beyond workflow, the kijai
double-encoded comment format, fp8-scaled safetensors metadata, etc.).
Toolkit
scripts/comfy_meta.py is a single self-contained Python file. It works
as both a library and a CLI with four subcommands. It uses PIL (for
PNG/WebP), PyAV (for MP4/WebM/audio), and safetensors (for
.latent), each imported only when a file of that format is read. A
ComfyUI install's .venv/ already has all three, so run the script with
that interpreter from the ComfyUI root:
.venv/bin/python ${CLAUDE_SKILL_DIR}/scripts/comfy_meta.py <subcommand> ...
Library use (batch scripts)
For batch work over many files (renaming, indexing, clustering), import comfy_meta directly instead of calling the CLI per file — the sys.path setup and an extract() / summarize() loop are in references/library-use.md.
The UI workflow half is useful too
extract()["workflow"] carries data summarize() drops — save-node filename_prefix widgets, node titles, group names — useful as a classification signal; example in references/library-use.md.
extract — dump the embedded JSON
# Both prompt + workflow as one JSON object on stdout
.venv/bin/python ${CLAUDE_SKILL_DIR}/scripts/comfy_meta.py extract output/WanVideoWrapper_I2V_00001.png
# Just one half (suitable for piping to jq)
.venv/bin/python ${CLAUDE_SKILL_DIR}/scripts/comfy_meta.py extract -k prompt path/to.png | jq .
.venv/bin/python ${CLAUDE_SKILL_DIR}/scripts/comfy_meta.py extract -k workflow path/to.mp4 | jq '.nodes | length'
# Re-import a downloaded JPEG/MP4 back into ComfyUI by saving its workflow:
.venv/bin/python ${CLAUDE_SKILL_DIR}/scripts/comfy_meta.py extract -k workflow some.mp4 > user/default/workflows/2026-05/recovered.json
summary — one-line, analysis-friendly settings
The summarizer walks the API-form prompt and pulls out the fields that actually matter for "what was different between run A and run B": model, text encoders, VAE, every sampler invocation (sampler/scheduler/steps/ cfg/denoise/seed), latent dims, num_frames, every LoRA + strength, and the positive/negative prompt text.
.venv/bin/python ${CLAUDE_SKILL_DIR}/scripts/comfy_meta.py summary output/WanVideoWrapper_I2V_00001.mp4
Output is JSON; use -p for a human-readable two-column print instead.
scan — index a directory into JSONL
Walk a tree (recursively by default) and emit one JSON record per output file. Use this to build a queryable index of every render on disk.
.venv/bin/python ${CLAUDE_SKILL_DIR}/scripts/comfy_meta.py scan output/ -o /tmp/runs.jsonl
# Then an
Install comfy-metadata in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
Bash(.venv/bin/python ${CLAUDE_SKILL_DIR}/scripts/comfy_meta.py *)Bash(jq *)Bash(ffmpeg *)Bash(magick *)ReadGrepGlobBundled files
FAQ
What does the comfy-metadata skill do?
Extract/analyze ComfyUI metadata embedded in output files - PNG tEXt, WebP EXIF, MP4/WebM container, .latent safetensors. Use when figuring out what prompt/settings produced a file, or comparing runs.
How do I install the comfy-metadata skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the comfy-metadata skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic