Nodes/ComfyUI_LC_MaskMaker_nodes/LC Z-Image AnyPaint 🩹
ComfyUI Node

LC Z-Image AnyPaint 🩹

Inpaint and outpaint for Z-Image (Turbo / Base) with Alibaba's Z-Image Fun ControlNet Union 2.1 in inpaint mode: the kept pixels put back after every step and a border the model blends. Your picture outside the mask comes back unchanged. Describe the whole finished picture in the prompt. Outpaint: wire LC Outpaint's or Rotate + Pad's control_image and control_mask in.

By lonecatone23Β·Created 16 days agoΒ·Updated about 16 hours agoΒ· 1
LC Z-Image AnyPaint 🩹
  • model
  • clip
  • vae
  • image
  • mask
  • image
  • mask
β—„promptβ–Ί
β—„control(no model patches found)β–Ί
β—„control_strength1.00β–Ί
β—„seed0β–Ί
β—„steps8β–Ί
β—„sampler_nameeulerβ–Ί
β—„schedulersimpleβ–Ί
β—„crop_to_masktrueβ–Ί
β—„padding128β–Ί
β—„inpaint_resolution1024β–Ί
β—„boundary_px32β–Ί
β—„compositekeep originalβ–Ί
CategoryLC MaskMaker/inpaint

Inputs (17)

NameTypeDefaultDescription
modelMODELZ-Image (Turbo / Base). The ControlNet patch is added for this node only.
clipCLIPZ-Image's text encoder (Qwen3 4B, CLIP type lumina2).
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 the WHOLE finished picture, not just the change: "a woman in a red coat on a snowy street". Removal-only prompts ("remove the car") tend to leave a flat blob.
controlCOMBO(no model patches found)Alibaba's Z-Image Fun ControlNet Union 2.1 (models/model_patches), used in inpaint mode. The 8steps one is made for Z-Image Turbo.
control_strengthFLOAT1.000–2How strongly the ControlNet holds the painting to your picture. 1 = as trained.
seedINT00–18446744073709550000β€”
stepsINT81–1008 (Krea 2 Turbo). The keep is exact with euler.
sampler_nameCOMBOeulereuler is what AnyPaint was trained and tested with; the keep step is exact only for euler.
schedulerCOMBOsimplesimple, as in the reference.
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).