InpaintingPipelineLoader
Where this pack's model download actually happens
- INPAINT_PIPELINE
Everything else in this pack's inpainting trio is lightweight. This node is the heavy one. It loads a full HuggingFace diffusers inpainting pipeline - a model plus a separate VAE - into memory, moves it to CUDA if it's available, and hands the whole thing to the pack's Inpainting node as an INPAINT_PIPELINE. If you're wondering why the first run of this pack takes forever, this is the node doing it.
How it works
Two HuggingFace calls, straight from the source:
vae = AutoencoderKL.from_pretrained(vae_name)
inpaint = StableDiffusionInpaintPipeline.from_pretrained(model_name, vae=vae)
The defaults are stabilityai/stable-diffusion-2-inpainting (the SD 2.1 inpainting model, a 768-base) plus the stabilityai/sd-vae-ft-mse VAE. Neither is shipped in the repo - both download from the HuggingFace Hub on first run, so budget for a couple of gigabytes on first use, and accept the license on the HF model page if it prompts you. It loads in fp32 by default; there's no torch_dtype=torch.float16 and no offloading in the code, so it's a genuinely hungry node on VRAM.
This is also the node that reveals the pack's lineage. Its author, Pfaeff, is a diffusers-era SD community handle, and this is a diffusers pipeline - not a ComfyUI safetensors checkpoint. If you already have an inpainting checkpoint and core ComfyUI nodes working, this pack duplicates the job in a parallel universe; the pipeline object it produces is only consumable by its own Inpainting node.
The inputs that matter
- model_name (STRING, default
stabilityai/stable-diffusion-2-inpainting) - any diffusers-compatible inpainting model on the Hub. You can swap in SD 1.5 inpainting or any other diffusers-compatible inpaint model on the Hub, but note that several SD-class models there are gated behind license acceptance - accept the terms and be logged in. And don't expect miracles from these defaults: the SD-class inpainting models are showing their age on edge-blending, and the KB's verdict is that no purpose-trained open inpainting checkpoint has shipped since FLUX.1 Fill. - vae_name (STRING, default
stabilityai/sd-vae-ft-mse) - the VAE to bolt on. The ft-mse VAE is the usual fix for the SD2 default VAE's blotchiness, and a sensible default here.
Output: a single INPAINT_PIPELINE - a custom type that only this pack's Inpainting node accepts. That's the one annoying thing about this stack: the pipeline isn't a checkpoint you can reuse elsewhere.
How to install it
Shared with the pack - a work in progress whose README says "not tested, yet". ComfyUI Manager if it's in the registry, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Pfaeff/pfaeff-comfyui
then restart. Dependencies (opencv-python-headless, diffusers) auto-install on first load; the actual models come from the Hub, not the repo.
Common issues & troubleshooting
First run looks frozen. It's downloading ~2.5GB of model plus ~335MB of VAE. Watch your network or the HF cache; subsequent runs are fast.
CUDA out of memory. Expected with an fp32 768-base pipeline loaded whole. There are no settings on this node to drop to fp16 or enable offloading, so your options are a smaller model, fewer concurrent Loader nodes, or not this pack. Two of these nodes at once each hold a full pipeline copy - don't.
The download fails or 401s. Gated model: accept the license on the HF page and log in (huggingface-cli login) with a token that has access.
"Nothing accepts INPAINT_PIPELINE." Correct - only this pack's Inpainting node takes this type. There's no conversion node, so you're committing to the pack's pipeline when you use this loader.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | STRING | stabilityai/stable-diffusion-2-inpainting | — |
| vae_name | STRING | stabilityai/sd-vae-ft-mse | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INPAINT_PIPELINE | INPAINT_PIPELINE | — |