Nodes/ComfyUI_photomakerV2_native/PhotoMaker Loader V2
ComfyUI Node

PhotoMaker Loader V2

The one-line node that makes PhotoMaker V2 actually run in ComfyUI

By zhangp365·Created 2 years ago·Updated 9 months ago· 13
PhotoMaker Loader V2
    • PHOTOMAKERV2
    photomaker_model_name

    PhotoMaker Loader V2 does exactly one job, and that job matters more than it looks: it loads TencentARC's photomaker-v2.bin into ComfyUI so the rest of the pipeline can use it. It's a single dropdown and a single output, and if you're on the current version of ComfyUI you genuinely need it, because the built-in PhotoMaker nodes are v1-only. Comfy never accepted a PR for v2, so this pack - an adaptation of the official Comfy v1 nodes, by zhangp365 - is one of the ways the V2 model gets in at all. Think of it as the gas cap of a PhotoMaker V2 workflow: boring, but nothing runs without it.

    What it actually is

    In the graph it sits at the start of your identity branch, feeding a PHOTOMAKERV2 model object into PhotoMakerEncodeV2. It's the same shape as CheckpointLoaderSimple or CLIPLoader - pick a file, get a handle. Under the hood it builds the PhotoMakerIDEncoder (a CLIP vision tower plus a QFormer "perceiver" that fuses face embeddings), loads the checkpoint with Comfy's safe torch loader, strips the id_encoder prefix from the keys if it's there, and parks the whole thing on the text-encoder device so Comfy can shuffle it in and out of VRAM like any other model. You never touch this node again after wiring it up.

    The one input and one output that matter

    There's only one input worth naming, and it's the one you'd guess:

    • photomaker_model_name - a dropdown listing every model file inside ComfyUI/models/photomaker. That folder is where the .bin has to live; it's not the same folder your checkpoints go in, and it's the classic "why is my dropdown empty" failure.

    Output:

    • PHOTOMAKERV2 - wire this into the photomakerv2 input of PhotoMakerEncodeV2. That's the entire wiring story.

    Installing it (the real way)

    Clone into custom_nodes, or grab it from ComfyUI Manager by searching "ComfyUI_photomakerV2_native". Then the two things people forget:

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

    That requirements file is a single line: insightface==0.7.3. InsightFace is the heavy one - it's the face-recognition library the whole pipeline leans on, and its install is where most people hit their first wall (it's notoriously picky about onnxruntime and CUDA versions; the modidex knowledge base's Kijai quote is apt: "lots of people have issues even just installing Insightface"). On first run the node auto-downloads the InsightFace models, so that part needs no manual step.

    The model itself you grab separately:

    https://huggingface.co/TencentARC/PhotoMaker-V2 → photomaker-v2.bin
    → ComfyUI/models/photomaker/
    

    The recommended base checkpoint is an SDXL model - the author's pick is realvisxlV40_v40Bakedvae - because V2 was trained for SDXL, not SD 1.5. If your dropdown is empty, you skipped the model download step.

    Common issues

    • Empty model dropdown - photomaker-v2.bin isn't in models/photomaker, or you put it in the wrong folder.
    • Node loads but nothing happens downstream - the loader isn't the problem; check that Encode is actually receiving the PHOTOMAKERV2 output.
    • CRASHED / CUDA errors right after install - that's InsightFace failing to build against your environment, not this node. Recreate the Python env or align onnxruntime with your CUDA version.

    One honest caveat before you invest: PhotoMaker V2 is a 2024 SDXL-era identity tool. Community consensus by the time you're reading this is that PuLID and the instruction-editing models beat it on photorealistic face fidelity - the people who used V2 in ComfyUI were mostly chasing its style handling, which it does well. If your goal is a single real face at 98% likeness, you may be happier elsewhere. But if you've got a V2 workflow you want alive again, this loader is the key that turns the ignition.

    Categoryphotomakerv2

    Inputs (1)

    NameTypeDefaultDescription
    photomaker_model_nameCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    PHOTOMAKERV2PHOTOMAKERV2