CustomExif
Attach camera metadata to an AI image
- image
- image
One of the quieter tells that an image is AI-generated is what's missing from it: real camera photos carry EXIF metadata (camera model, lens, exposure settings), and generated images usually carry none - or worse, a ComfyUI/generation-tool signature instead. Adding plausible EXIF data back in is a standard move in photorealism-focused workflows, and CustomExif is the node that lets you write whatever metadata string you want onto an image before it's saved.
It does exactly one thing: takes your image and a text string, and attaches that string as the image's EXIF payload. It doesn't generate the string for you or validate that it's well-formed EXIF - you're writing it yourself.
The inputs and outputs that matter
image- what you're tagging.custom_exif- a multiline text field, empty by default, where you type whatever metadata you want attached.
One image output - and this is the part people miss: attaching EXIF here doesn't automatically mean it survives to the saved file. The pack's own README is explicit about this: "It is recommended to use the SaveImageWithCustomExif node to save images." Chain CustomExif into that pack's dedicated save node, not the core ComfyUI Save Image node - the standard save node doesn't know this custom metadata exists and can drop it.
How to install it
Search ComfyUI-HakuImg in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone --recurse-submodules https://github.com/licyk/ComfyUI-HakuImg
Restart ComfyUI and find it under Image → HakuImg, alongside its save-node partner. No models involved - it's just string-and-pixel handling.
Common issues & troubleshooting
Metadata isn't showing up in the saved file. By far the most common issue, and it's the one the README calls out directly: you saved with the core Save Image node instead of SaveImageWithCustomExif. CustomExif attaches metadata to the in-graph image object; only its matching save node actually writes it to disk.
Not sure what to put in custom_exif. There's no schema enforced by the node - it's a raw string - but if your goal is a metadata reader to actually parse it as real EXIF, keep it to standard tag-like text (camera make/model, exposure, lens) rather than freeform notes. A malformed or nonstandard string will still get attached, but a downstream tool trying to read it as genuine EXIF may not recognize the fields.
Worth thinking about before you use this. Faking camera metadata to make a generated image look like a real photograph is a deliberate deception, and the line between "polishing a render for a portfolio" and "misrepresenting where an image came from" is a real one worth being honest with yourself about, depending on where the image ends up.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| custom_exif | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |