Nodes/ComfyUI_LC_MaskMaker_nodes/LC MOSS AnyPaint ๐Ÿฉน
ComfyUI Node

LC MOSS AnyPaint ๐Ÿฉน

MOSS Image Has No Inpaint Model โ€” This Node Does the Job Anyway

By lonecatone23ยทCreated about a month agoยทUpdated a day agoยท 8
LC MOSS AnyPaint ๐Ÿฉน
  • model
  • clip
  • vae
  • image
  • mask
  • image
  • mask
โ—„promptโ–บ
โ—„negativensfw, worst quality, bad anatomy, watermark, jpeg artifactโ–บ
โ—„skip_layertrueโ–บ
โ—„seed0โ–บ
โ—„steps25โ–บ
โ—„cfg2.5โ–บ
โ—„sampler_nameer_sdeโ–บ
โ—„schedulersimpleโ–บ
โ—„crop_to_masktrueโ–บ
โ—„padding128โ–บ
โ—„inpaint_resolution1024โ–บ
โ—„boundary_px8โ–บ
โ—„compositekeep originalโ–บ

If you're on MOSS Image, you've already hit the wall: no inpaint checkpoint, no inpaint LoRA, no ControlNet with a mask mode. Every guide you find either tells you to use Flux Fill (different model, different look) or to go install LanPaint and wait. LC MOSS AnyPaint is the third option - it fakes masked inpainting on MOSS properly, by keeping your pixels outside the mask at every single step instead of trusting the model to leave them alone.

Why you'd want this instead of an edit model

The one thing masks still own is bit-identical unmasked pixels. An edit model takes the whole frame into context and hands back a whole new frame, so everything nobody asked about drifts - and the drift compounds if you chain two edits. The 2026 answer is crop โ†’ edit โ†’ stitch, with the stitch protecting the rest of the picture.

This node is that pattern rebuilt around MOSS. It sits in LanPaint's slot - masked conditioning for a base that shipped without an inpaint variant - except it trades extra sampling for a hard keep: your untouched region is written back after every step, token-exact.

How it works

Say yes to crop_to_mask (the default) and your mask gets its own crop, plus padding px of context around it, scaled up to inpaint_resolution. Then:

  • The hole is pre-filled by smearing the surrounding picture into it (OpenCV Telea fill), not with noise. MOSS starts from something plausible instead of white mush.
  • A per-token keep mask is built. A latent token survives only if all of its pixels sit outside the painted area grown by boundary_px. MOSS latents are one token per latent pixel, so this is about as tight as you can get.
  • Sampling runs at full denoise with a real negative and real CFG - the thing SDXL users miss most on Flux-era models - and skip_layer runs ComfyUI's skip-layer guidance on layer 22 for the first half of the steps - MOSS's own recommendation, and what keeps fine detail from quietly falling apart.
  • On the way out, only the painted area plus half the border is pasted back with a soft edge, and colour drift measured in the outer border is corrected - the same seam fix the pack's Smart Detailer uses. Keep composite on keep original; raw hands you the whole redraw of the crop, which is for debugging.

The inputs that actually matter

model, clip and vae have to be MOSS Image's own trio - the class check will refuse anything else, and the encoder is Qwen3.5-9B with CLIP type moss_image. Then image and mask (white paints). The mask is genuinely optional: leave it off and wire LC Outpaint's control_image / control_mask in and the node outpaints the opened-up canvas instead.

prompt is where most people lose an afternoon. Describe only what goes into the mask. Write "a black sign reading MOSS on a rainy window" and you get a sign; write a description of the whole photo and MOSS paints a second person into the crop, because that's what you asked for. Want text in the image? Put it in quotes.

If you're on the 8-step turbo LoRA: steps 8, cfg 1, skip_layer off. Otherwise 25 steps, cfg 2.5, er_sde / simple. boundary_px stays at 8 - wider borders come back soft and leave a halo. And small text needs the full step count; the turbo LoRA garbles it.

Outputs are image and mask, where the mask marks what was actually pasted back, so you can chain another pass or hand it to the pack's refine nodes.

Installing it

ComfyUI Manager โ†’ search ComfyUI LC MaskMaker Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/lonecatone23/ComfyUI_LC_MaskMaker_nodes

Restart. There's no requirements.txt; the pack's install.py only pip-installs transformers, huggingface_hub and timm if they're missing, and it never touches torch, numpy or pillow. Nothing is bundled or auto-downloaded for this node - MOSS's weights, encoder, VAE and the optional turbo LoRA come from wherever you already got them.

Where it goes wrong

The prompt trap is the big one: a flat blob where a car used to be looks like a broken node rather than a prompt that described the wrong thing. Tell it what should be there instead.

crop_to_mask on for a small inpaint is right, but for outpaint the mask runs along the frame edge and the crop ends up being most of the picture anyway, so the siblings in this pack document turning it off. And inpaint_resolution above roughly 1.6 MP is where this family starts creasing limbs - it's an area, not an edge length, so 1024 means about a megapixel.

One caveat: MOSS Image has almost no community footprint yet, so there's no folklore for its settings to check your sanity against - the tooltips here are effectively the documentation. Follow them, and don't get creative with CFG until you have a result you like.

CategoryLC MaskMaker/inpaint

Inputs (18)

NameTypeDefaultDescription
modelMODELMOSS Image (SFT or Base). With the 8-step turbo LoRA: steps 8, cfg 1, skip_layer off.
clipCLIPMOSS Image's text encoder (Qwen3.5-9B, CLIP type moss_image).
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 only what goes in the mask, short: a black sign reading "MOSS" on a rainy window. A description of the whole picture paints the whole picture (a second person) into the masked area. Text you want written goes in quotes.
negativeSTRINGnsfw, worst quality, bad anatomy, watermark, jpeg artifactMOSS uses a real negative. The recommended one is filled in.
skip_layerBOOLEANtrueSkip layer 22 on the negative pass (the first half of the steps), as MOSS recommends: keeps fine detail from falling apart. Turn it off with the 8-step turbo LoRA.
seedINT00โ€“18446744073709550000โ€”
stepsINT251โ€“10025 (ComfyUI's MOSS template). 8 with the 8-step turbo LoRA on the model.
cfgFLOAT2.50โ€“302.5 - 3. 1 with the 8-step turbo LoRA.
sampler_nameCOMBOer_sde44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
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_pxINT80โ€“128Border around the mask that is redrawn and blended (redraw pixels). 8 for MOSS: wider borders come back soft and leave a blurred halo around the painted area.
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).