Enforce Depth Consistency
Blend face boundaries so 360° depth stops tearing
- cubemap
- CUBEMAP
This is the node that makes the DreamCube approach actually work. Estimate depth on six separate faces and you'll get six good depth maps with ugly seams where they meet - a wall that's continuous in reality reads as a step at the front/right boundary. Enforce Depth Consistency is the manual, tunable version of the seam-blending pass, and it's the difference between depth that looks assembled and depth that looks like one continuous 360° scene.
The mechanism is boundary blending with a linear weight ramp, straight out of the DreamCube paper's multi-plane synchronization idea. Along each face edge it averages the depth of the two adjacent faces, with a weight of 1.0 at the face center fading to 0.5 at the boundary - so the face's own depth dominates in the interior and the neighbor's opinion carries equal weight right at the seam. It walks every edge in the cubemap's adjacency map and can run multiple smoothing passes over the whole thing.
Two knobs control it:
boundary_width- how many pixels of each edge get blended, default 16, range 4–64. This is your main quality dial. Too small and the seam survives; too large and you start smearing real geometry near the edges.iterations- how many full smoothing passes, default 2, range 1–10. More passes propagate the correction further inward, which helps when a seam error is wide rather than sharp.
If you came through Batch Cubemap Depth with enforce_consistency on, that node already ran a fixed-strength version of this (16-pixel band, two iterations, no way to change it). You'd add this node afterward when the automatic pass wasn't enough - which, on any panorama with real depth range, it often isn't. The README's high-quality recipe is boundary_width=24, iterations=3.
Inputs and outputs
cubemap- a cubemap with depth; throwsCubemap has no depth informationif there's none.boundary_width- pixels to blend per edge, default 16.iterations- smoothing passes, default 2.
Output is a CUBEMAP with the depth layer blended. RGB is untouched.
How to install it
ComfyUI Manager, search "DreamCube", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/cedarconnor/ComfyUI-DreamCube.git
cd ComfyUI-DreamCube
pip install -r requirements.txt
No model downloads, no keys. It's weighted averaging over NumPy arrays.
Where people get burned
The classic mistake is cranking boundary_width to the max and wondering why edges look smeared - at 64 pixels on a 1024 face, you're blending the outer 12% of every face, and real structure (door frames, building corners that happen to sit on a seam) gets averaged into mush. Raise it in steps of 8 and check with Validate Cubemap Seams after each step rather than guessing. And remember the honest limit of blending: it can smooth a seam, but it can't invent depth the estimator missed. If two faces genuinely disagree about where the floor is, blending just gives you a smooth wrong answer.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| cubemap | CUBEMAP | — | |
| boundary_width | INT | 164–64 | Pixels to blend along each face edge |
| iterations | INT | 21–10 | Number of smoothing passes |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CUBEMAP | CUBEMAP | — |