ComfyUI Node
Atlas Depth Layer Mask π
A ComfyUI node in Atlas/03 Β· Depth with 17 inputs and 4 outputs.
Atlas Depth Layer Mask π
- solve
- depth
- exclude_mask
- band_split
- band_ref_mask
- layer_mask
- occlusion_mask
- hole_mask
- report
βnear_m0.0βΊ
βfar_m0.0βΊ
βnear_pct0.00βΊ
βfar_pct0.50βΊ
βfeather_px4βΊ
βcompute_hole_maskfalseβΊ
βrelief_grid384βΊ
βdepth_edge_rel1.50βΊ
βfill_occludedfalseβΊ
βband_sidemanualβΊ
βband_overrideβΊ
βquad_coherencetrueβΊ
CategoryAtlas/03 Β· Depth
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| solve | ATLAS_SOLVE | β | |
| depth | ATLAS_DEPTH_MAP | β | |
| near_mopt | FLOAT | 0.00β10000 | Band near edge in metres. 0 = auto (use near_pct). |
| far_mopt | FLOAT | 0.00β10000 | Band far edge in metres. 0 = auto (use far_pct). |
| near_pctopt | FLOAT | 0.000β1 | Used when near_m==0: POSITION ALONG THE SCENE'S LOG-DEPTH RANGE, not a pixel percentile (depth is skewed β pixel percentiles wasted 0-0.9 on the foreground; 0.5 here = the geometric mean of the scene's depth range, perceptually mid-scene). LOWER = closer near threshold = tighter occlusion. Try 0.2-0.4 for a typical foreground object. |
| far_pctopt | FLOAT | 0.500β1 | Used when far_m==0: position along the scene's LOG-depth range (see near_pct). 0 means no upper bound (+inf); values at or above ~1.0 also mean no cap. |
| feather_pxopt | INT | 40β64 | Dilate occlusion_mask's edge by this many pixels β a small safety margin on top of whatever grow INPAINT_ExpandMask applies downstream. |
| compute_hole_maskopt | BOOLEAN | false | Build this band's own relief mesh (same as AtlasCleanPlateLayer will do later) to derive hole_mask - the mesh's real tear/sky hole data, not a depth-band heuristic. Off by default: this is a real (duplicate) mesh build, not free like the other two masks. |
| relief_gridopt | INT | 38416β4096 | Only used when compute_hole_mask=True. MUST match the AtlasCleanPlateLayer call downstream for hole_mask to reflect the actual final mesh (default 384 = the band-layer calibration). |
| depth_edge_relopt | FLOAT | 1.500.05β5 | Only used when compute_hole_mask=True. MUST match the AtlasCleanPlateLayer call downstream for hole_mask to reflect the actual final mesh (default 1.5 = the band-layer calibration). |
| exclude_maskopt | MASK | Optional external exclusion (e.g. a real sky segmentation from SAM/RMBG) which REPLACES the internal sky heuristic - so it must cover EVERYTHING you want gone. Affects layer_mask/occlusion_mask (excluded pixels can't belong to any band) AND hole_mask when compute_hole_mask=True. Any resolution - resized to match depth. | |
| fill_occludedopt | BOOLEAN | false | Only used when compute_hole_mask=True. MUST match the AtlasCleanPlateLayer setting downstream for hole_mask to reflect the actual final mesh - when the layer will diffusion-fill the occluder footprint, that footprint is no longer a hole here either. |
| band_sideopt | COMBO | manual | With band_split connected: foreground = [0, split), background = [split, +inf) β the node's own near/far widgets are ignored. manual = use this node's own near/far settings. |
| band_splitopt | ATLAS_BAND_SPLIT | Wire ONE AtlasDepthBandSplit into every band node (with band_side set) so the fg/bg boundary lives in exactly one widget and the layers can never drift apart. | |
| band_ref_maskopt | MASK | Exclusion used ONLY for resolving near/far percentages to metres. When exclude_mask carries per-layer scoping (π― scope rows), each layer's depth population differs and the shared band edges DRIFT apart (metric gaps between adjacent bands β debug-report finding). Wire the plain SKY mask here on every band node so all layers resolve identical edges. Unwired = legacy behavior (band edges from exclude_mask's population). | |
| band_overrideopt | STRING | Optional band override STRING ('near_pct=<f> far_pct=<f>') β wins over this node's near/far widgets when non-empty. Wire AtlasAssessImage's band_far/bg/mid/fg output here so the VLM's subject-aware band boundaries flow in (jointly derived, so adjacent bands always share edges exactly). Loses to a connected band_split. Errors loudly on garbage. | |
| quad_coherenceopt | BOOLEAN | true | Only used when compute_hole_mask=True. Match AtlasCleanPlateLayer to keep hole QA identical to the final mesh. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| layer_mask | MASK | β |
| occlusion_mask | MASK | β |
| hole_mask | MASK | β |
| report | STRING | β |