Split Cubemap Faces (Stack)
Unpack a cubemap face stack into named faces — without guessing the order
- face_stack
- Front
- Right
- Back
- Left
- Up
- Down
Once a cubemap gets packed into a single B*6 face stack, the faces lose their names. Split Cubemap Faces (Stack) gives them back: it takes one tensor and returns six - Front, Right, Back, Left, Up, Down - each as its own batch of images. It's the other half of the pack's Stack node, and the thing you reach for when a model or a converter hands you an anonymous stack and you need to work on individual faces.
Why you'd actually use it: the LatLong flexible cubemap converter can emit a stack (cube_format='stack'), and anything you feed through a model or a seam-edit step comes back as one merged tensor. Splitting it restores named faces so you can inspect, edit, or reorder them before they go anywhere meaningful. The author built this for exactly that round-trip - the README calls the stack format the seam-edit carrier format.
How it works
The face_stack input is a tensor of shape (B*6, H, W, C). The node reads face_order (default F,R,B,L,U,D), parses it with the same synonym table as the Stack node (top/bottom work for up/down), and validates that exactly six distinct faces are named. It then gathers every face at its designated position in the stack and regroups them so each output holds B images - the same faces from all your panoramas, as a proper batch.
It will reject a stack whose first dimension isn't divisible by 6 with a clear ValueError, which is your cue that the input isn't actually a face stack.
Inputs and outputs:
face_stack- requiredIMAGE, shape(B*6, H, W, C).face_order- optional string. Must match how the stack was created. If the stack came from the pack's Stack node or the flexible converter, feed it the same order they used.- Outputs: six
IMAGEbatches,Front/Right/Back/Left/Up/Down.
How to install
It ships in the LatLong pack:
cd ComfyUI/custom_nodes
git clone https://github.com/cedarconnor/comfyui-LatLong.git
cd comfyui-LatLong
pip install -r requirements.txt
Restart ComfyUI, or search "LatLong" in ComfyUI Manager. Dependencies are numpy, opencv-python, scipy, torch, Pillow - nothing heavy, no model downloads.
Gotchas
- The order trap is the real failure mode. If your faces come out scrambled - front where back should be - the
face_orderyou typed doesn't match the one used to build the stack. Find the original order and mirror it. - The first dimension must be divisible by 6. If it's not, you don't have a face stack; you have a regular batch that happens to look like one.
- Splitting returns
Bimages per face from aB*6stack. If you had three panoramas, each face output is a batch of three - don't be surprised the batch didn't shrink to one.
It's the "unboxing" node of the pack: one tensor in, six named faces out, no ambiguity about which is which.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| face_stack | IMAGE | Stacked cubemap faces (B*6, H, W, C). | |
| face_orderopt | STRING | F,R,B,L,U,D | Input stack face order. Must match how the stack was created. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| Front | IMAGE | — |
| Right | IMAGE | — |
| Back | IMAGE | — |
| Left | IMAGE | — |
| Up | IMAGE | — |
| Down | IMAGE | — |