Nodes/ComfyUI_pytorch360convert/Split Cubemap Faces
ComfyUI Node

Split Cubemap Faces

Cut your skybox into six flat squares so you can actually edit them

By ProGamerGov·Created 2 years ago·Updated 11 months ago· 37
Split Cubemap Faces
  • face_stack
  • Front
  • Right
  • Back
  • Left
  • Up
  • Down

A cubemap is a 360° environment stored as six flat squares - front, right, back, left, up, and down - each one a normal, rectangular image. That's the format a lot of skybox and HDRI tooling actually wants, because "flat square" is far friendlier to inpainters, upscalers, and ComfyUI in general than a heavily warped equirectangular pancake. This node takes a cubemap that's packed into a single image tensor and hands you the six faces as six separate images you can do whatever you want with.

It's part of ProGamerGov's pytorch360convert pack, the ComfyUI wrapper around the author's pytorch360convert library. It's also the exact inverse of the pack's "Stack Cubemap Faces" node - split first, edit, stack to rebuild.

How it works

In this pack, a cubemap "stack" isn't a six-panel grid. It's a single IMAGE whose batch dimension holds six frames - batch size 6, each frame one face. That's the format "Equirectangular to Cubemap" (E2C) produces by default, and it's what "Cubemap to Equirectangular" (C2E) expects on the way back. This node just pulls those six frames apart and returns each one as its own image.

You feed it one thing:

  • face_stack - an IMAGE with exactly six frames. If you feed it a normal image with batch size 1, it'll assert and refuse, which is the pack telling you to run E2C first.

And you get six outputs, named the way you'd expect: Front, Right, Back, Left, Up, Down. The order matters because "Stack Cubemap Faces" expects exactly this sequence to put it back together.

The workflow it unlocks

The pack ships an example called split_and_merge_faces.json that shows the loop: equirect → "Equirectangular to Cubemap" → this node → six separate previews → edit faces → "Stack Cubemap Faces" → "Cubemap to Equirectangular" → back to a proper 360. Where people actually use this is per-face editing - you want to inpaint the floor without touching the sky, or upscale each face at its own resolution, or relight just the "Up" face. Cubemap faces have far less distortion than an equirectangular image, so inpainting on faces tends to look a lot cleaner than inpainting on the wrapped panorama.

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". The only dependency is the pytorch360convert library - no model files to fetch.

Gotchas

  • Face order is sacred: Front → Right → Back → Left → Up → Down. If you swap them, your "sky" texture ends up on the floor and C2E will happily build you a wrong-shaped world.
  • Keep the faces the same resolution when you stack them back, or the rebuild gets cranky. If you upscale a single face, upscale them all.
  • If you don't need to touch individual faces, don't bother with this node - equirect → cubemap → equirect round trips cost you quality, and splitting to edit and immediately re-stacking is only worth it when you actually edit.
Categorypytorch360convert/miscellaneous

Inputs (1)

NameTypeDefaultDescription
face_stackIMAGE

Outputs (6)

NameTypeDescription
FrontIMAGE
RightIMAGE
BackIMAGE
LeftIMAGE
UpIMAGE
DownIMAGE