加载/附加 EXIF
Feed your real camera's settings into a fake watermark
- image_passthrough
- image
- exif_json
This node exists for one reason: so the fake camera watermark isn't obviously fake. The whole point of a "shot on iPhone" style frame is that it's plausible, and nothing kills the illusion faster than a settings line saying 24mm | f/1.8 | 1/125s when you know nothing about that photo. ImageLoaderWithEXIF loads a real photo you took, reads its EXIF data, and hands the actual camera specs to the watermark node - so your generated image wears your real camera's numbers.
It ships in the same pack as CameraWatermarkNode, and it's the entry point of that workflow: load the photo here, feed its exif_json into the watermark node's exif_data input, and the watermark fills itself in with your genuine model, lens, aperture, shutter speed, ISO, focal length, and timestamp.
How it works
The pack's one real dependency is piexif, a small library for reading and writing EXIF. The node opens the image you pick, pulls the EXIF block out of it, and parses the tags that actually matter for a camera watermark: Make, Model, LensModel, DateTimeOriginal, FNumber, ExposureTime, ISOSpeedRatings, and FocalLength. Those get serialized into a JSON string. It also applies EXIF orientation - the magic that keeps phone photos from coming out sideways - before converting the image to the standard 0–1 tensor ComfyUI expects.
Two honest limits. First, this reads EXIF from the file; it does not write EXIF to anything. "附加 EXIF" (attach EXIF) is about feeding the watermark text, not embedding metadata into your output. Second, it only pulls the tags the watermark displays - no geotag, no camera serial, nothing creepy.
Inputs and outputs
- image_file - a dropdown of images in your ComfyUI
inputfolder, with the usual upload button. Drop a real photo in there to use it. - image_passthrough (optional) - feed an IMAGE in here and the node returns it untouched while still reading EXIF from
image_file. Useful if your image comes from somewhere else in the graph but you want the settings from a photo. - Outputs: image (the loaded photo, orientation-corrected) and exif_json (a STRING). The first wires into whatever needs an image; the second goes to CameraWatermarkNode's
exif_datainput. That's the whole pairing.
Installing it
Same pack as CameraWatermarkNode - ComfyUI Manager, search "ComfyUI Camera Watermark", or:
cd ComfyUI/custom_nodes
git clone https://github.com/karas17/ComfyUI-Camera-Watermark
Restart. If you cloned by hand, install the dependency the README doesn't tell you about:
cd ComfyUI/custom_nodes/ComfyUI-Camera-Watermark
pip install -r requirements.txt
That installs piexif, and it isn't optional - the node raises an ImportError with "pip install piexif" in the message if it's missing.
Gotchas and troubleshooting
- AI images have no EXIF. If you point this at a generated image,
exif_jsoncomes back as"{}"and the watermark node falls back to whatever text you typed. That's the correct behavior, not a bug - this node's whole job is real photos. - If piexif is missing you get the ImportError above, and it'll happen the moment the node runs, not at startup. The manual-install folks are the ones who hit it.
- It reads from
ComfyUI/input, same as the built-in Load Image node. Files elsewhere won't show up. - Not every photo has a full set of tags (cheap lenses often skip lens model, timestamps go missing after some apps re-encode). Missing tags just quietly vanish from the JSON - the watermark shows what's there.
It's a small, single-purpose node from a small, mostly-undocumented pack - expect to read the source if something surprises you. But once it's wired up, it's the difference between a watermark that says "SONY" and one that says "SONY, your actual camera, at your actual settings."
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image_file | COMBO | 1 options: example.png | |
| image_passthroughopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| exif_json | STRING | — |