⭐ Star Meta Injector
Stamp a workflow onto any image — even one that was never in ComfyUI
- target_image
Here's a workflow you've definitely hit: you generate an image, hand-edit it in Photoshop, add a watermark, recolor it - and now the file you actually want to share has no ComfyUI metadata in it. Anyone who drags it back into ComfyUI gets nothing. Star Meta Injector fixes exactly that: it copies the metadata (including the embedded workflow JSON) from an old source image and stamps it onto a new target image, then saves the result. The original workflow rides along, even though the pixels are no longer what produced it.
The flip side is even more fun: take any image from anywhere, inject a workflow that plausibly generated it, and export a "workflow included" PNG. The community treats embedded workflows as a social contract - posts without them draw "workflow not included" flak, as the KB's ecosystem essay notes - so this is your tool when you need a shareable file that carries its graph.
How it works
The node takes a live image tensor (target_image) and a path to an existing file (source_image_path - relative to the ComfyUI root, like output/ComfyUI_00001_.png). It opens the source, pulls out all its PNG text chunks - the ComfyUI workflow JSON, the prompt info, generation parameters, any custom fields - and writes that metadata onto a copy of the target image before saving it to your output folder.
That's the whole mechanism, and it's worth being precise about what it doesn't do: it doesn't embed the current workflow's metadata. It copies whatever metadata the source file has. The source is the metadata donor, the target is the pretty picture. If you want your current workflow embedded, use the standard Save Image or the pack's Save Image+; use this when you want a specific workflow to travel with an image.
Inputs and outputs
- target_image (
IMAGE) - the image that receives the metadata and gets saved. - source_image_path (
STRING) - path to the source PNG or WEBP that holds the metadata. Get the format right: the node expects a relative path from your ComfyUI directory. - filename_prefix (
STRING, defaultComfyUI) - prefix for the saved file; a counter gets appended. - save_as -
pngorwebp. PNG keeps the standard ComfyUI PNG metadata chunk layout; WEBP stores the same info in EXIF tags instead. If your downstream tool reads PNG workflow chunks (most of the community tooling does), stick withpng.
No outputs - it's an output node; it just writes the file.
Install
Part of the Starnodes2024/ComfyUI_StarNodes pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
cd ComfyUI_StarNodes
pip install -r requirements.txt
Restart, then search star from the canvas. ComfyUI Manager users: search "Starnodes". No per-node dependencies here.
Where people get burned
The classic failure is a typo'd source_image_path - the node can't find the file, and it should error visibly. Double-check it's relative to ComfyUI's root, not an absolute path or one relative to output/. Also remember the metadata is a copy, not a merge: whatever the source has is what you get, so pick a source that actually contains the workflow you want attached. And if the source is a WEBP whose metadata lives in EXIF rather than PNG chunks, the copy is only as portable as the format you choose in save_as.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| target_image | IMAGE | The image that will receive the metadata and be saved | |
| source_image_path | STRING | Path to source PNG/WEBP file with metadata to copy (e.g., 'output/ComfyUI_00001_.png') | |
| filename_prefix | STRING | ComfyUI | Prefix for the output filename |
| save_as | COMBO | png | Output format. PNG preserves standard ComfyUI PNG metadata. WEBP stores metadata in EXIF tags. |
Outputs (0)
No outputs