Stack Cubemap Faces
Put the skybox back together — the inverse nobody memorizes
- Front
- Right
- Back
- Left
- Up
- Down
- Cubemap stack
Every workflow that splits a cubemap into faces eventually has to put it back together, and this is the node that does it. "Stack Cubemap Faces" takes six individual face images and packs them into a single cubemap stack - exactly the format the pack's "Cubemap to Equirectangular" (C2E) node needs to build a proper 360° equirectangular image. It's the bookend to "Split Cubemap Faces", and if you use one, you will eventually need the other.
It's part of ProGamerGov's pytorch360convert pack, the ComfyUI wrapper around the author's pytorch360convert library.
How it works
The mechanism is a single torch.cat along the batch dimension. Each face you feed in is a normal IMAGE (batch size 1, one flat square), and the node concatenates all six into one tensor with batch size 6. That stack is the cubemap representation this pack uses internally - the same thing "Equirectangular to Cubemap" (E2C) emits and C2E consumes.
Six inputs, all of them face images:
- Front, Right, Back, Left, Up, Down - each an
IMAGE.
One output: Cubemap stack, which wires straight into C2E (with cube_format set to "stack") to rebuild the equirectangular image, or back into "Split Cubemap Faces" if you just want to reorder something.
The workflow it slots into
The standard round trip: E2C to turn your equirect into a stack, "Split Cubemap Faces" to get six editable squares, do your per-face edits - inpaint the floor, upscale the sky, whatever - and then this node to reassemble before C2E converts back to a viewable 360. The pack's split_and_merge_faces.json example is exactly this loop. The whole point is that editing flat, low-distortion faces is dramatically easier than editing a warped panorama, and this node is the return trip that makes the detour worthwhile.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/ProGamerGov/ComfyUI_pytorch360convert
python -m pip install pytorch360convert
Or ComfyUI Manager, search "ComfyUI_pytorch360convert". Single dependency (pytorch360convert), no model downloads.
Gotchas
- Order is everything. The node stacks inputs in the exact order Front, Right, Back, Left, Up, Down, and "Split Cubemap Faces" and C2E both expect that same convention. Feed it faces in the wrong order and your sky will end up under your feet with no error message to warn you.
- All six faces should be the same size. The stack doesn't enforce it, but C2E does its sampling per-face, and mismatched resolutions produce a warped, stitched-looking output.
- If you only changed one face, you still have to feed all six. The node has no "keep the others" shortcut - it wants the full set every time.
It's a boring, mechanical node, and that's the compliment. In a pack full of spherical math, this one just does what you tell it, as long as you respect the order.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| Front | IMAGE | — | |
| Right | IMAGE | — | |
| Back | IMAGE | — | |
| Left | IMAGE | — | |
| Up | IMAGE | — | |
| Down | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Cubemap stack | IMAGE | — |