Nodes/ComfyUI-BrushNet-Wrapper/PowerPaint BrushNet Sampler
ComfyUI Node

PowerPaint BrushNet Sampler

Inpainting with Intent, Not Just a Mask

By kijai·Created 2 years ago·Updated 2 years ago· 150
PowerPaint BrushNet Sampler
  • brushnet
  • image
  • mask
  • images
steps25
cfg7.50
cfg_brushnet1.00
control_guidance_start0.00
control_guidance_end1.00
guess_modefalse
clip_skip0
seed0
schedulerUniPCMultistepScheduler
promptcaption
n_promptcaption
tasktext-guided
fitting_degree1.00

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_brushnet in 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) to ComfyUI/models/brushnet on 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.

CategoryBrushNetWrapper

Inputs (16)

NameTypeDefaultDescription
brushnetBRUSHNET
imageIMAGE
maskMASK
stepsINT251–200
cfgFLOAT7.500–20
cfg_brushnetFLOAT1.000–20
control_guidance_startFLOAT0.000–1
control_guidance_endFLOAT1.000–1
guess_modeBOOLEANfalse
clip_skipINT00–20
seedINT00–18446744073709550000
schedulerCOMBOUniPCMultistepScheduler10 options: DPMSolverMultistepScheduler, DPMSolverMultistepScheduler_SDE_karras, DDPMScheduler, LCMScheduler, PNDMScheduler, DEISMultistepScheduler, +4
promptSTRINGcaption
n_promptSTRINGcaption
taskCOMBOtext-guided5 options: text-guided, object-removal, context-aware, shape-guided, image-outpainting
fitting_degreeFLOAT1.000.3–1

Outputs (1)

NameTypeDescription
imagesIMAGE