Nodes/ComfyUI-DreamCube/Extract Cubemap Face
ComfyUI Node

Extract Cubemap Face

Get one clean face out of the panorama for any depth model

By cedarconnor·Created 10 months ago·Updated 9 months ago· 2
Extract Cubemap Face
  • cubemap
  • IMAGE
face

The whole reason ComfyUI-DreamCube works is that it estimates depth face by face instead of on the distorted equirectangular image. Extract Cubemap Face is the bridge between "cubemap world" and everything else in ComfyUI: it pulls a single square face out of a CUBEMAP and hands it back as a plain IMAGE that any normal node - a Depth Anything wrapper, an upscaler, whatever you like - can process.

There's nothing clever about the mechanism, which is the point. It reads the face's NumPy array out of the cubemap structure and wraps it in a [1, H, W, C] tensor, the standard ComfyUI image format. The face comes out at exactly the cubemap's resolution, so a cubemap built at 1024 gives you 1024×1024 faces, square and undistorted. That's the fix for the pole-stretching problem: the top and bottom faces are as geometrically clean as the front one.

Inputs and outputs

  • cubemap - any CUBEMAP from Equirect to Cubemap, Create Empty Cubemap, or a depth node that returns one.
  • face - which of the six you want: front, back, left, right, top, bottom.

The output is IMAGE, ready to plug into your depth model of choice. Depth Anything V2 Large remains the sensible default for this kind of job (it's been the community's daily driver for years, and it's what the DreamCube README recommends), with Marigold as the quality-over-speed option if your source is unusual or synthetic.

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 models to download, no keys. The dependencies are torch, numpy, scipy and friends - all of which ComfyUI already runs.

Gotchas

If the face you ask for was never set, the node throws Face X is not set in cubemap. You'll hit that if you Create Empty Cubemap, forget to insert a face, and then try to extract it - a reminder that an empty cubemap is a structure with holes, not a black image. Also note this node is one face at a time: if you're feeding all six faces to the same depth model, that's six copies of this node hanging off one cubemap, or you can skip straight to Batch Cubemap Depth and let it take all six depth maps at once.

CategoryDreamCube/Projection

Inputs (2)

NameTypeDefaultDescription
cubemapCUBEMAP
faceCOMBOWhich cube face to extract

Outputs (1)

NameTypeDescription
IMAGEIMAGE