πͺ Metadata comparator
The node Crystools was actually built for
- metadata_raw_old
- metadata_raw_new
- diff
Straight from the README: this is "the main reason why I created this extension." Crystools is best known today for the resource monitor in the top menu bar, but the whole pack started because its author wanted an easy way to see what actually changed between two generations - which is exactly what this node does.
ComfyUI embeds the full prompt and workflow into every PNG it saves, which is genuinely great for reproducibility (drag the image back in and the graph rebuilds) but useless for the specific question "what did I change between this output and the last one." Eyeballing two blocks of JSON to spot a seed or a CFG value that moved is tedious. Metadata comparator does that diff for you.
How it works
Under the hood it runs on DeepDiff, a Python library built for exactly this - recursively walking two data structures and reporting what's different between them. You give it two metadata blobs and it hands back the delta.
The inputs and outputs that matter
metadata_raw_old/metadata_raw_new- both required, and both must beMETADATA_RAWtype, not plain JSON. You get that type from Load image with metadata or Preview from image's Metadata RAW output - this node compares two saved-image records, not arbitrary data. (If you want to diff two generic JSON objects instead, that's JSON comparator, the sibling node.)what- a required dropdown with three choices:Prompt,Workflow, orFileinfo. Prompt compares the values actually used to produce the image; Workflow compares the entire node graph; Fileinfo compares things like resolution, size, and datetime.- Output:
diff(JSON) - the same thing you see displayed on the node itself, in one of three shapes depending on what's different:values_changed,dictionary_item_added, ordictionary_item_removed, checked in that priority order. This is a real, is-output-node node - it'll show its result in the UI even with nothing downstream, and if you do want to chain it, thediffoutput is JSON-typed and feeds straight into JSON extractor to pull out just the one field you care about.
How to install it
Through ComfyUI Manager: search crystools, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/crystian/comfyui-crystools.git
cd comfyui-crystools
pip install -r requirements.txt
You'll find it under crystools πͺ / Metadata afterward - nothing to download beyond the pip requirements, this node doesn't touch your GPU.
Common issues & troubleshooting
The type requirement is the thing that trips people up first: both inputs need to be METADATA_RAW, and the only nodes in this pack that produce it are Load image with metadata, Preview from image, Save image with extra metadata, and Preview from metadata. Trying to feed it a plain string or a raw JSON object won't connect - ComfyUI will refuse the link outright, which is annoying in the moment but at least fails loudly rather than silently.
Beyond that, remember what "Workflow" actually compares if you use it: the full node graph, not just the values you tweaked. If you changed a checkpoint between two runs, that shows up as a values_changed diff on the loader node's widget, buried alongside every other node id in the graph - Prompt mode is usually the faster read for "what values changed" since it's scoped to just the generation parameters, and Workflow is what you reach for when you actually restructured the graph itself.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| metadata_raw_old | METADATA_RAW | β | |
| metadata_raw_new | METADATA_RAW | β | |
| what | COMBO | 3 options: Prompt, Workflow, Fileinfo |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| diff | JSON | β |