Nodes/Nifty Nodes for ComfyUI/Embed Media Meta Bundle
ComfyUI Node

Embed Media Meta Bundle

Bake a settings manifest into your saved PNGs

By Stibo·Created 5 months ago·Updated 2 months ago· 9
Embed Media Meta Bundle
  • input
  • meta_bundle
  • output
modeoverwrite

You've generated something great and you'd love the PNG on disk to remember how it was made - the model, the seed, the settings. ComfyUI's PNG files already carry the full workflow in their metadata, but that's only useful if you can read it back programmatically. Nifty Embed Media Meta Bundle is the pack's answer: it injects a BUNDLE dict into the workflow's extra_pnginfo, which means any Save Image node downstream bakes it into the PNG header. You pick what travels with the image, not what ComfyUI happens to include.

The node is also a pass-through: input (any type) goes in, the identical value comes out on output. So you drop it on the wire between a loader and a Save Image node - the image flows through untouched while the metadata gets attached alongside. You can chain it right after a loader so the value you're saving and the metadata you're embedding travel together.

The inputs that matter

  • input - any value, passed through unchanged.
  • meta_bundle - the BUNDLE to embed. This is where the round-trip gets nice: the pack's loaders (Load & Resize Image, Load & Resize Media) read embedded metadata back out as a meta_bundle output, and you can also build one from scratch with the pack's Bundle Pack node - up to 32 named values of any type in a single wire.
  • mode - what happens to existing metadata. overwrite replaces the whole meta_bundle with yours. merge combines: your new keys override, but keys you didn't touch are preserved.

Output: output - the input, unchanged.

How it works

Under the hood it grabs the workflow's hidden extra_pnginfo and writes your bundle into a meta_bundle key on it. When a Save Image node runs afterward, that info is serialized into the PNG's tEXt chunks. The merge mode is the one that saves you from clobbering a longer metadata story - if the file already carries a bundle from an earlier embed step, merge lets you add a key or two without nuking the rest.

Gotchas, honestly

Three things to keep straight. First, the bundle only gets embedded if a Save Image node actually runs downstream - this node just prepares the metadata; it doesn't save anything itself. Second, overwrite is the default and it's blunt: it replaces any existing meta_bundle wholesale, so if you're chaining two of these, switch the second to merge or you'll lose the first's keys. Third, it's PNG-specific - the extra_pnginfo mechanism is the PNG metadata path, not a general sidecar system.

Install

Nifty Nodes: ComfyUI Manager → search "Nifty Nodes", or

cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes

Restart ComfyUI, keep ComfyUI current (v3 API). No extra dependencies, no model files. It's a quiet node that rewards you months later when a folder of PNGs can tell you exactly what made them.

Categorynifty/media

Inputs (3)

NameTypeDefaultDescription
inputCOMFY_MATCHTYPE_V3
meta_bundleBUNDLE
modeCOMBOoverwriteoverwrite: replaces meta_bundle entirely with the new bundle. merge: combines with any existing meta_bundle — new keys override old ones, keys not present in the new bundle are kept.

Outputs (1)

NameTypeDescription
outputCOMFY_MATCHTYPE_V3