Nodes/ComfyUI PhotoMaker (ZHO)/📷NEW PhotoMaker Generation
ComfyUI Node

📷NEW PhotoMaker Generation

The node that actually does the PhotoMaker thing

By ZHO-ZHO-ZHO·Created 3 years ago·Updated 2 years ago· 814
📷NEW PhotoMaker Generation
  • pipe
  • pil_image
  • IMAGE
positive
negative
batch_size1
style_strength_ratio20
steps50
guidance_scale5.00
width1024
height1024
seed0

This is the payoff node of ZHO-ZHO-ZHO's PhotoMaker port - the one that turns a reference photo into a brand-new generation. Everything else in this pack exists to feed it: the base model loader hands it a pipe, the adapter loader makes that pipe PhotoMaker-aware, and Ref Image Preprocessing supplies the faces. If you googled "photomaker comfyui" and landed here, this is the node you actually wanted to understand.

PhotoMaker, in case you only know the name, is TencentARC's zero-shot identity method: give it a few photos of a person and it renders that same person in new poses, outfits, styles - no LoRA training, no per-person fine-tuning. It lives in the same family as IP-Adapter and InstantID, but it does something slightly different: it stacks the ID embeddings of all your reference images into one averaged identity vector rather than conditioning on a single image. That's why more reference shots make it better, and why one bad angle doesn't tank the whole run.

How it works under the hood (from the source, not the README): the adapter adds img as a special trigger token to the CLIP tokenizers. During sampling the pipeline first denoises on your text prompt alone, then fuses the reference identity partway through. The style_strength_ratio slider sets where that fusion happens - it computes start_merge_step = ratio/100 × steps, capped at 30. Lower ratio means identity kicks in earlier: stronger likeness, less prompt freedom. Higher means more style and pose leeway, weaker identity. The default of 20 is a sensible starting point; just know that anything over 30 is treated as 30.

The inputs a beginner actually sets:

  • positive / negative - wired in, not typed. Both are forceInput, so ComfyUI won't let you type directly into them; you have to connect a text node (or this pack's Prompt_Styler). This trips up more people than anything else about this pack.
  • pipe - the MODEL out of your base loader → adapter loader chain.
  • pil_image - reference images from Ref_Image_Preprocessing.
  • batch_size (1–4), steps (default 50 - the author says 30 is enough and he's right; this is SDXL), guidance_scale (~5), width/height around 1024 (step of 32), seed.

Output is a single IMAGE tensor (one batch per run), which you feed to Save Image or a Preview node. Batch size just multiplies variants; it doesn't unlock anything exotic.

Installing the pack is the usual dance - via ComfyUI Manager (search "PhotoMaker") or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker-ZHO
cd ComfyUI-PhotoMaker-ZHO
pip install -r requirements.txt

Restart ComfyUI, then grab two models: an SDXL base checkpoint (the default is RealVisXL V3.0) and the PhotoMaker adapter photomaker-v1.bin from TencentARC/PhotoMaker. Budget for roughly 10GB VRAM - this is a diffusers pipeline wrapper, not the lean native port, and the A100 timings in the README are not your 3060.

Where people get burned: the trigger word. Your prompt has to contain img right after the class word - photo of a man img wearing sunglasses - and tokenization is whitespace-sensitive, so img, can silently fail where img , works. Missing or mangling it is the #1 "photomaker doesn't take effect" report in the community. If identity isn't showing up, check that before you touch any slider.

Category📷PhotoMaker

Inputs (11)

NameTypeDefaultDescription
positiveSTRING
negativeSTRING
batch_sizeINT11–4
style_strength_ratioINT201–50
stepsINT501–100
guidance_scaleFLOAT5.000–10
widthINT1024512–2048
heightINT1024512–2048
seedINT00–18446744073709550000
pipeMODEL
pil_imageIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE