ComfyUI Node

相机水印

Make your AI images look shot on a real camera

By karas17·Created about a year ago·Updated 10 months ago· 18
相机水印
  • image
  • IMAGE
layout
restore_presetfalse
randomize_stylefalse
random_style_selection1-10
seed0
use_exiftrue
block_a_text_1iPhone 15 Pro Max
block_a_text_2Main Camera
block_a_text_3© KARAS
block_b_text_1SONY
block_b_text_224mm | f/1.8 | 1/125s | ISO 50
block_b_text_3
logoleica
logo_size_ratio1.0
bar_size200
bar_width1894
bar_height165
padding50
spacing15
font_name
font_bold_name
font_size_large48
font_size_medium28
font_size_small24
bg_color#FFFFFF
title_color#000000
subtitle_color#888888
exif_data

The name is a lot of what it does: this is the node that slaps a camera-style watermark and frame onto an image. If you've ever seen a photo post captioned with "shot on iPhone" or carrying a little red Leica dot and thought "I want that look on my generations," this is the tool. It's a pure post-processing node - one image in, one framed image out, no model download, no GPU cost, runs in milliseconds on CPU.

Why would you reach for it? In the photorealism playbook, the last mile of "this looks real" is presentation. The KB's realism notes point out that AI images carry tells - no EXIF, wrong aspect ratios - and that adding plausible camera details is part of a convincing workflow. The watermark frame is the same idea, aimed at the phone-photography aesthetic that dominates social feeds: a white bottom bar, a camera model line, a settings line like 24mm | f/1.8 | 1/125s | ISO 50. It reads as "captured," not "generated."

How it works

Under the hood it's PIL drawing, nothing fancier. The node converts your IMAGE tensor to a PIL image, then depending on the chosen layout either extends the canvas with a colored bar (bottom, top-and-bottom, or right side) or overlays text inside the frame. It renders two text blocks - block A (camera model, lens, copyright line) and block B (brand, settings, timestamp) - plus a logo pasted in with its transparent border auto-cropped. Worth knowing: everything scales down proportionally for images narrower than 1200px wide, so a small generation doesn't end up with a giant chunky bar on it.

Inputs and outputs that matter

  • image - the thing you're framing.
  • layout - ten dropdown choices, all labeled in Chinese: bottom-bar left/right or centered, right-side vertical, top-and-bottom, in-frame overlay in each corner and center, and a standalone info bar. The first two are the classic "shot on phone" look.
  • block_a_text_1/2/3 and block_b_text_1/2/3 - the text blocks. Defaults are iPhone 15 Pro Max / Main Camera / © KARAS and SONY / 24mm | f/1.8 | 1/125s | ISO 50. Just type over them.
  • logo - 124 bundled choices pulled from the pack's logos folder: leica, hasselblad, zeiss, canon, fujifilm, dji, plus a stack of car badges. Add your own transparent-background .png there and it appears in the list after a restart.
  • use_exif - on by default. If a valid exif_data string is wired in (see the companion node), it overwrites your typed text with real camera settings. If nothing's wired, it quietly uses your typed text.
  • restore_preset - a boolean that acts like a button: flip it true, queue once, and the selected layout's recommended settings snap back. Handy after you've fiddled things into a mess.
  • randomize_style + random_style_selection + seed - picks a random layout for you; random_style_selection takes ranges like 1-5, 8. The winner prints to the console; the dropdown won't reflect it.

Everything else - bar_size, padding, spacing, font_size_large/medium/small, bg_color, title_color, subtitle_color, logo_size_ratio - is styling. One trap: bar_width and bar_height only do anything on layout 10 (the standalone info bar). Everywhere else, bar thickness comes from bar_size. That's the kind of thing that makes you think the node is broken when it isn't.

The single output is an IMAGE, so it drops straight into a Save Image node.

Installing it

Easiest route is ComfyUI Manager: search "ComfyUI Camera Watermark" and hit install. Manual install is the usual:

cd ComfyUI/custom_nodes
git clone https://github.com/karas17/ComfyUI-Camera-Watermark

Then restart ComfyUI. The pack's only real dependency is piexif (Manager installs it for you). If you cloned by hand, don't skip this - the README forgets to mention it:

cd ComfyUI/custom_nodes/ComfyUI-Camera-Watermark
pip install -r requirements.txt

Gotchas

  • use_exif overwrites your text. When EXIF is active, block A's third line is hardcoded to © KARAS - there's no input to change it. If you want your own copyright line, leave use_exif off.
  • The bundled fonts are Alibaba PuHuiTi, a Chinese-first typeface. Fine for the defaults, but drop your own .ttf/.otf into the fonts folder for Latin text with more personality.
  • It's a tiny pack - no real community discussion, a bilingual (Chinese-first) README, defaults aimed at Chinese-market phone brands. Expect to figure some things out yourself.

Troubleshooting

The most common failure is nothing rendering where you expect it. Check layout first - if you're editing bar_width expecting a bottom bar, you're on the wrong knob. If text is missing, the fonts failed to load (the console warns and falls back to a default). If piexif is missing you'll see an ImportError - that's the manual-install dependency gap above. And the dropdown labels are in Chinese: layouts 1–2 are the bottom bars, 5–9 the in-frame overlays.

CategoryWatermark

Inputs (29)

NameTypeDefaultDescription
imageIMAGE
layoutCOMBO10 options: 1. 底部留白 - 左右分布, 2. 底部留白 - 居中, 3. 右侧留白 - 上下竖排, 4. 顶部 & 底部留白, 5. 画内叠加 - 左下角, 6. 画内叠加 - 右下角, +4
restore_presetBOOLEANfalse
randomize_styleBOOLEANfalse
random_style_selectionSTRING1-10
seedINT00–18446744073709550000
use_exifBOOLEANtrue
block_a_text_1STRINGiPhone 15 Pro Max
block_a_text_2STRINGMain Camera
block_a_text_3STRING© KARAS
block_b_text_1STRINGSONY
block_b_text_2STRING24mm | f/1.8 | 1/125s | ISO 50
block_b_text_3STRING
logoCOMBOleica124 options: None, Dodge, Faraday%20Future, Ferrari, Fiat, Ford, +118
logo_size_ratioFLOAT1.00.1–3
bar_sizeINT2000–2048
bar_widthINT189464–8192
bar_heightINT16564–8192
paddingINT500–400
spacingINT150–200
font_nameCOMBO2 options: Alibaba-PuHuiTi-Bold.ttf, Alibaba-PuHuiTi-Medium.ttf
font_bold_nameCOMBO1 options: Alibaba-PuHuiTi-Bold.ttf
font_size_largeINT488–200
font_size_mediumINT288–200
font_size_smallINT248–200
bg_colorSTRING#FFFFFF
title_colorSTRING#000000
subtitle_colorSTRING#888888
exif_dataoptSTRING

Outputs (1)

NameTypeDescription
IMAGEIMAGE