PowerPaint BrushNet Sampler
Inpainting with Intent, Not Just a Mask
- brushnet
- image
- mask
- images
BrushNet Sampler turns a masked region into "generate something here." PowerPaint BrushNet Sampler turns it into a job: remove the object, fill in the context, extend the canvas, or repaint the shape - all from the same mask, picked from a dropdown instead of prompt acrobatics. It's the task-aware flavor of this pack, and the most interesting node in it.
What PowerPaint adds
PowerPaint (zhuang2002) is a task-conditioned inpainting model built on the BrushNet architecture. Where plain BrushNet just regenerates the mask, PowerPaint steers how it regenerates using learned prompt tokens. Behind the scenes the node swaps your prompt for a task-specific token pair - P_obj / P_ctxt / P_shape - that the model was trained to read as "put the object here," "reconstruct the scene here," or "follow this shape." For object removal and outpainting it also quietly appends empty scene (or empty scene blur) to your prompt so the model knows the area should be background, not content.
That's why this node is worth learning even in 2026: object removal with clean, context-consistent fill is exactly the job that plain inpainting botches and that PowerPaint was trained to nail.
The task dropdown
The task enum is the whole point:
- text-guided - default; classic "generate what the prompt says in the mask."
- object-removal - erase the masked object, fill with plausible background.
- context-aware - regenerate content that fits the surrounding scene.
- shape-guided - honor the mask's shape while painting new content.
- image-outpainting - extend the canvas beyond the original edges.
fitting_degree (default 1.0, range 0.3–1.0) controls how strongly the result sticks to the source image - the tradoff in the pipeline. Lower it to let the model drift more from the original pixels; keep it at 1.0 for faithful, surgical edits.
Everything else is inherited from the parent sampler: image, mask, prompt / n_prompt, steps, cfg, cfg_brushnet, control_guidance_start/end, guess_mode, clip_skip, seed, scheduler. Output is images (IMAGE), composited back over the original as usual.
The constraints that will bite you
- Model pairing is enforced. Load
powerpaint_v2_brushnetin the model loader and the plain sampler refuses to run it - you must use this node. Conversely, this node asserts the loaded pipeline is PowerPaint. The loader auto-downloads the PowerPaint weights plus a separate text encoder (powerpaint_brushnet_text_encoder_fp16.safetensors) toComfyUI/models/brushneton first use. - No IP-Adapter. This node raises if the brushnet carries an IP-Adapter - unlike the plain sampler, which supports it.
- SD 1.5 only, like the rest of the pack (v1-inference config).
Installing
Pack standard: ComfyUI Manager search "BrushNet", or clone and pip-install:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-BrushNet-Wrapper
cd ComfyUI-BrushNet-Wrapper
pip install -r requirements.txt # portable: python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-BrushNet-Wrapper\requirements.txt
Then restart and let the first run pull the PowerPaint model + text encoder.
One caveat worth stating plainly: PowerPaint v2 works, but it's a 2024 SD 1.5 model, and its task-aware fills show their age next to modern instruction-editing models. Where it still wins is deterministic removal/outpainting with a controlled mask and bit-identical unmasked pixels. If that's your use case, this node is the cleanest way to get it - just don't expect the polish of a 2025-26 edit model.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| brushnet | BRUSHNET | — | |
| image | IMAGE | — | |
| mask | MASK | — | |
| steps | INT | 251–200 | — |
| cfg | FLOAT | 7.500–20 | — |
| cfg_brushnet | FLOAT | 1.000–20 | — |
| control_guidance_start | FLOAT | 0.000–1 | — |
| control_guidance_end | FLOAT | 1.000–1 | — |
| guess_mode | BOOLEAN | false | — |
| clip_skip | INT | 00–20 | — |
| seed | INT | 00–18446744073709550000 | — |
| scheduler | COMBO | UniPCMultistepScheduler | 10 options: DPMSolverMultistepScheduler, DPMSolverMultistepScheduler_SDE_karras, DDPMScheduler, LCMScheduler, PNDMScheduler, DEISMultistepScheduler, +4 |
| prompt | STRING | caption | — |
| n_prompt | STRING | caption | — |
| task | COMBO | text-guided | 5 options: text-guided, object-removal, context-aware, shape-guided, image-outpainting |
| fitting_degree | FLOAT | 1.000.3–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |