Nodes/ComfyUI-DreamCube/Batch Cubemap Depth
ComfyUI Node

Batch Cubemap Depth

The one node that turns six depth maps into one consistent 360° depth

By cedarconnor·Created 10 months ago·Updated 9 months ago· 2
Batch Cubemap Depth
  • cubemap_rgb
  • depth_front
  • depth_back
  • depth_left
  • depth_right
  • depth_top
  • depth_bottom
  • CUBEMAP
enforce_consistencytrue
normalizationglobal

This is the node the pack was built around. Batch Cubemap Depth takes six individual depth maps - one per face, each estimated independently by whatever depth model you like - and stitches them into a single cubemap with depth, synchronizing the scales and optionally blending the seams. It's the difference between "six decent face depth maps that don't agree with each other" and "one 360° depth that reads as a continuous scene."

The standard DreamCube pipeline looks like this: load a panorama, Equirect to Cubemap, extract all six faces, run a depth node on each face, then feed the six depth outputs here along with the original cubemap. Six wires in, one consistent cubemap out. The pack's README explicitly blesses this - it calls it the "basic workflow" - and it's why the node has six depth inputs.

Here's the mechanism, because it matters. It collects all six depth maps and, on the default global normalization, rescales them to a shared [0, 1] range using the min/max across all faces. That's the thing that makes faces comparable - run a depth model on six independent squares and each comes back with its own arbitrary range; without global normalization the left face's "1.0" means something totally different from the right face's. The other options: per_face normalizes each face on its own scale (loses cross-face comparability), and adaptive passes the model's raw values through untouched - useful if your depth node already outputs a consistent scale and you don't want DreamCube second-guessing it.

Then, if enforce_consistency is on (it is by default), it runs the boundary-blending pass - but with fixed settings baked in (a 16-pixel blend band, two smoothing iterations). If you want to tune that blending, chain Enforce Depth Consistency after this node instead of guessing at hidden knobs.

Inputs and outputs

The inputs that matter:

  • cubemap_rgb - your CUBEMAP with the RGB faces.
  • depth_front, depth_back, depth_left, depth_right, depth_top, depth_bottom - the six depth IMAGEs, each from any depth node. All are required; leave none dangling or it errors.
  • enforce_consistency - seam blending on/off, default on. Leave it on.
  • normalization - global (default), per_face, or adaptive, as above.

Output is a CUBEMAP carrying both RGB and depth, ready for Cubemap to Equirect (pick depth or rgbd output type) or Cubemap Preview.

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 API keys. The pack is pure NumPy/SciPy math on top of what ComfyUI already ships (torch, numpy, scipy, pillow, plus opencv-python and einops in requirements).

Where people get burned

The depth maps need to match the face resolution, so if your depth node downsamples, resize before this node or you'll hit shape errors. And the classic gotcha: feeding the six faces through different depth models produces wildly different per-face scales, which global normalization mostly rescues but won't fully fix if one face is garbage. Use the same model (Depth Anything V2 Large is the community default) across all six for a first pass - then, if seams still show, check them with Validate Cubemap Seams instead of trusting your eyes.

CategoryDreamCube/Depth

Inputs (9)

NameTypeDefaultDescription
cubemap_rgbCUBEMAP
depth_frontIMAGE
depth_backIMAGE
depth_leftIMAGE
depth_rightIMAGE
depth_topIMAGE
depth_bottomIMAGE
enforce_consistencyBOOLEANtrueBlend seams after applying depths to reduce edge artifacts
normalizationCOMBOglobalDepth scaling: global = shared min/max; per_face = independent; adaptive = raw

Outputs (1)

NameTypeDescription
CUBEMAPCUBEMAP