Apply Depth to Cubemap Face
Attach depth to a single cubemap side
- cubemap
- depth_map
- CUBEMAP
Apply Depth to Cubemap Face is the per-face version of Batch Cubemap Depth: it takes one depth map, produced by any ComfyUI depth node, and attaches it to one face of a cubemap. You'd reach for it when you want surgical control - a different depth model on different faces, or a workflow where you only need depth on a few sides and don't want to wire up all six inputs.
The mechanism is unglamorous but worth understanding. The node grabs the first batch item of your IMAGE, and if the depth came back multi-channel it keeps just the first channel (depth models output a single grayscale channel; some wrappers hand it back as three copies). Then it normalizes that face's depth to [0, 1] using that face's own min/max - per-face normalization, hardcoded. That matters: each face is scaled independently, so absolute depth values aren't comparable across faces yet. That's fine for eyeballing and for downstream blending, and it's exactly the inconsistency the synchronization nodes exist to clean up.
Inputs and outputs
cubemap- the target, usually from Equirect to Cubemap.depth_map- depth from any IMAGE-outputting depth node (Depth Anything V1/V2, DA3, MiDaS, Marigold - whatever you have). Depth Anything V2 Large is the reliable default for ordinary photographs.face- the target:front,back,left,right,top,bottom.
Output is a CUBEMAP with that face's depth set and the cubemap flagged as having depth. Everything else stays 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 weights to fetch, no keys. Dependencies are torch, numpy, scipy, pillow, opencv-python and einops - all local math.
Gotchas
The depth map's size must match the face resolution or you'll get a shape error, so if your depth model outputs at a different resolution than your cubemap faces, resize before connecting. And a friendly warning: six copies of this node is exactly the workflow Batch Cubemap Depth exists to replace. Start with the batch node; go per-face only when one face genuinely needs a different treatment. If you do mix models per face, hit the result with Normalize Cubemap Depth or Enforce Depth Consistency, because faces with different depth ranges will otherwise meet at the edges with a visible step.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| cubemap | CUBEMAP | — | |
| depth_map | IMAGE | — | |
| face | COMBO | Target face for this depth map |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CUBEMAP | CUBEMAP | — |