Nodes/ComfyUI-Paint-by-Example/Load Paint-by-Example Pipe
ComfyUI Node

Load Paint-by-Example Pipe

The whole Paint-by-Example pipeline in a single node

By Kangkang625·Created 3 years ago·Updated 2 years ago· 17
Load Paint-by-Example Pipe
    • MODEL
    checkpointPaint-by-Example

    There isn't much to this node, and the honest review is that that's the point. Load Paint-by-Example Pipe is the on-ramp for a single model: Fantasy-Studio's Paint-by-Example, the 2023 "show, don't tell" inpainting model. You feed it a reference image instead of a prompt, and it repaints a masked region to match. It's the exact opposite of the modern instruction editors like Qwen-Image-Edit or Flux Kontext - those need a sentence, this one needs a picture. Old, but still the only way to do that specific trick in ComfyUI.

    What this loader does is pull that model into your graph as one "MODEL" socket. That's the whole job.

    How it works

    The single input is checkpoint, a dropdown with exactly one choice: "Paint-by-Example." Don't go looking for a folder browser - there's nothing to enumerate. It's a decorative selector; the node always does the same thing, which is:

    DiffusionPipeline.from_pretrained("Fantasy-Studio/Paint-by-Example", torch_dtype=torch.float16).to("cuda")
    

    So the mechanism is a thin wrapper around the official HuggingFace diffusers pipeline. The first time it runs it downloads the model - roughly 2 GB, cached in ~/.cache/huggingface - then loads it as fp16 straight onto your GPU. Every re-execution builds a fresh pipeline, though ComfyUI caches the node's output between queues, so in practice you pay the load cost once per workflow.

    The output MODEL is the entire pipeline. That's also the most important thing to understand about it: despite the socket name, this is not a normal ComfyUI model. You can't wire it into a KSampler, an empty latent, or any of your usual sampling nodes. Only Sample with Paint-by-Example Pipe from this same pack knows how to talk to it. Keep the pair together and you're fine.

    Why the honest version matters

    Ground yourself before you build on this: it's a 2023 model running at a 512 native resolution on a Stable Diffusion 1.4 base. It's a historical curiosity with one genuinely unique ability (reference-guided editing), not a piece of modern infrastructure. The whole pack sees effectively zero community traffic, and the model itself stopped being discussed in the wild around 2024. Install it for the trick, not as the foundation of your workflow.

    Install

    ComfyUI Manager: search "ComfyUI-Paint-by-Example." Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Kangkang625/ComfyUI-paint-by-example
    # restart ComfyUI
    

    The pack has no requirements.txt - the README just says "install the used package in the nodes.py," which is a nicer way of saying "figure it out yourself." The one dependency ComfyUI won't already have is diffusers (pip install diffusers into ComfyUI's Python environment). The loader hardcodes CUDA, so CPU-only and Apple Silicon installs won't work regardless.

    Common issues

    • Node never appears in the menu - diffusers isn't installed and nothing auto-installs it. Add it yourself and restart.
    • First execution crawls or seems frozen - that's the ~2 GB download. It's a one-time cost.
    • CUDA errors on a non-NVIDIA machine - expected; the code path is .to("cuda") with no fallback.
    • Wondering where the checkpoint choices are - there aren't any. One model, one choice, that's the feature.

    Wire it to the sampler, set your image, mask, and example, and you're done. Just don't expect this to compete with anything released in the last two years.

    CategoryComfyUI Paint-by-Example

    Inputs (1)

    NameTypeDefaultDescription
    checkpointCOMBOPaint-by-Example1 options: Paint-by-Example

    Outputs (1)

    NameTypeDescription
    MODELMODEL