Nodes/Atlas Camera/Atlas Segmented SDXL Inpaint 🏒
ComfyUI Node

Atlas Segmented SDXL Inpaint 🏒

Atlas Segmented SDXL Inpaint 🏒 β€” many holes, one pass, per-region attention

By mikejamesvfxΒ·Created 3 months agoΒ·Updated a day agoΒ· 1
Atlas Segmented SDXL Inpaint 🏒
  • image
  • restrict_mask
  • image
  • report
β—„promptbuilding facade, photorealistic continuationβ–Ί
β—„checkpointSDXL/sd_xl_base_1.0.safetensorsβ–Ί
β—„max_instances4β–Ί
β—„steps30β–Ί
β—„cfg4.0β–Ί
β—„denoise0.65β–Ί
β—„seed0β–Ί
β—„crop_max_side1024β–Ί

AtlasSegmentedSDXLInpaint is the big-sibling version of AtlasSDXLInpaint, built for the case where one plate has many disconnected holes and you don't want to run them as one giant mask. It takes a restrict_mask - typically a big union mask covering several tear regions across a facade - splits it into connected components, and inpaints each region separately with its own crop, its own budget, and the same prompt. Up to max_instances regions (default 4), each one processed independently and stitched back.

Why bother segmenting? One giant inpaint mask forces SDXL to hold every hole in one latent at once, which means each hole gets a fraction of the generation budget and they all fight for the same context. Split the mask into its component islands and each gets a full-resolution crop to itself - the "crop small, render big, paste back" loop that's been the reliable way to fix small broken parts of a big image since detailers existed. The KB's summary of the whole category applies verbatim: every detailer is just zooming in on a mask, upscaling, and diffusing. This node automates that per region.

Inputs that matter

  • image and restrict_mask - the plate and the union of regions to fix.
  • prompt - one prompt applied to every region ("building facade, photorealistic continuation" is the tuned default). If regions need different content, run multiple of these with different restrict masks rather than forcing one prompt.
  • checkpoint - SDXL-compatible, in models/checkpoints.
  • max_instances - 1 to 8; how many connected components to process. Components beyond the cap are left alone.
  • steps, cfg, denoise, seed - per-crop sampler controls. Note the defaults are gentler than the single-mask node: denoise 0.65, cfg 4.0, because each crop is small and you want the surroundings to anchor the fill.
  • crop_max_side - per-crop long-edge clamp (1024 = SDXL native, result upscaled back; 0 = off). Same trick as AtlasSDXLInpaint's max_side: the anti-OOM dial.

Outputs: the composited image and a report (which tells you how many regions it found and fixed - read it when a mask unexpectedly produced zero regions).

The trap

The mask you feed is the contract. If it's noisy or feathered, connected-component labelling can merge two holes that should be separate (one region, shared crop, awkward fill) or fragment one hole into many (each gets its own cropped render, then they stitch with visible seams). Clean the restrict mask before you feed it - the pack's other mask nodes exist for exactly this. And if a region is bigger than you expected, crop_max_side isn't just an OOM dial, it's also a quality dial: too small and the fill lacks context, too big and you're back to the budget problem.

Install

Same as its sibling - no extra Python deps, just an SDXL checkpoint:

cd <ComfyUI>/custom_nodes
git clone https://github.com/mikejamesvfx/atlas-camera.git

Restart or use ComfyUI Manager ("atlas-camera"). It's in Atlas/07 Β· Clean Plate & Inpaint, right next to the single-mask version - pick this one when your clean-plate job is several holes instead of one.

CategoryAtlas/07 Β· Clean Plate & Inpaint

Inputs (10)

NameTypeDefaultDescription
imageIMAGEβ€”
restrict_maskMASKβ€”
promptSTRINGbuilding facade, photorealistic continuationβ€”
checkpointSTRINGSDXL/sd_xl_base_1.0.safetensorsβ€”
max_instancesINT41–8β€”
stepsINT301–100β€”
cfgFLOAT4.00–30β€”
denoiseFLOAT0.650–1β€”
seedINT00–18446744073709550000β€”
crop_max_sideoptINT10240–4096Per-crop long-edge clamp fed to the inner SDXL inpaint (1024 = SDXL native; result upscaled back). 0 = off.

Outputs (2)

NameTypeDescription
imageIMAGEβ€”
reportSTRINGβ€”