Nodes/ComfyUI_LC_MaskMaker_nodes/LC SDXL AnyPaint 🩹
ComfyUI Node

LC SDXL AnyPaint 🩹

Inpaint and outpaint for any SDXL checkpoint (SDXL, Pony, Illustrious, your finetunes), painted by xinsir's ControlNet Union ProMax in repaint mode, optionally with Fooocus's inpaint patch. The kept pixels are put back after every step and a border is blended. Your picture outside the mask comes back unchanged. No LoRA needed. Describe what goes in the mask in a short prompt. Outpaint: wire LC Outpaint's or Rotate + Pad's control_image and control_mask in.

By lonecatone23·Created 23 days ago·Updated about 8 hours ago· 4
LC SDXL AnyPaint 🩹
  • model
  • clip
  • vae
  • image
  • mask
  • image
  • mask
◄prompt►
◄negative►
◄controloff►
◄control_strength1.00►
◄fooocus_inpaintoff►
◄seed0►
◄steps25►
◄cfg5.0►
◄sampler_namedpmpp_2m►
◄schedulerkarras►
◄crop_to_masktrue►
◄padding128►
◄inpaint_resolution1024►
◄boundary_px32►
◄compositekeep original►
CategoryLC MaskMaker/inpaint

Inputs (20)

NameTypeDefaultDescription
modelMODELAny SDXL checkpoint. The inpaint patch is added for this node only.
clipCLIPThe checkpoint's CLIP.
vaeVAE—
imageIMAGE—
maskMASKWhite = paint, black = keep. Optional: no mask with LC Outpaint's canvas uses its mask. Wire LC Outpaint's control_image as the image and control_mask as the mask to outpaint.
promptSTRINGDescribe what goes in the mask, short: "a red bucket full of fish on the pier". To remove something, describe what should be there instead ("empty wooden planks"). Empty works too: it fills from the picture around the mask.
negativeSTRINGWhat you don't want. SDXL uses a real negative prompt.
controlCOMBOoffxinsir's ControlNet Union SDXL ProMax (models/controlnet), used in repaint mode: it holds edges, light and perspective to your picture. off = Fooocus inpaint only.
control_strengthFLOAT1.000–2How strongly the ControlNet holds the painting to your picture. Lower = more freedom inside the mask.
fooocus_inpaintCOMBOoffOptional. lllyasviel's Fooocus inpaint patch (models/inpaint, with fooocus_inpaint_head.pth next to it). Blends best and matches the colours around it, but rebuilds what was there more than it adds new things. Good for outpaint and fills. With the ControlNet on too, drop control_strength to about 0.5 (Pony / Illustrious turn to noise at 1). Needs Acly's comfyui-inpaint-nodes.
seedINT00–18446744073709550000—
stepsINT251–10025 - 30 for a normal SDXL checkpoint, fewer for Lightning / DMD ones (then cfg 1 - 2).
cfgFLOAT5.00–30SDXL cfg. 4 - 6 for most checkpoints.
sampler_nameCOMBOdpmpp_2m44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBOkarras9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
crop_to_maskBOOLEANtrueOn: a small mask is redrawn in its own crop, scaled up to inpaint_resolution (more detail). Off: the whole picture at inpaint_resolution.
paddingINT1280–2048Context around the mask when cropping (px). More = the model sees more of the scene.
inpaint_resolutionINT1024256–2048Size of the redraw (as an area: 1024 = about 1 MP). AusBoss found above about 1.6 MP Krea 2 starts to crease limbs and darken skies.
boundary_pxINT320–128Border around the mask the model redraws to blend the seam (in redraw pixels). 32 = the reference.
compositeCOMBOkeep originalkeep original = only the painted area (soft edge, colour fixed) is pasted back: everything else is exactly your picture. raw = the model's whole redraw of the crop.

Outputs (2)

NameTypeDescription
imageIMAGEYour picture with the masked area painted.
maskMASKWhere it was pasted back (soft edge).