Cubemap to Equirect
Six cube faces, one 360° panorama — stitch them back together without touching the math
- cubemap
- IMAGE
You generated a 360° environment and now you've got six square faces instead of a panorama. CubemapToEquirect (class CubemapToEquirect) is the node that folds those six squares back into a single 2:1 equirectangular image - the format 360° viewers, VR headsets, and HDRI skybox pipelines actually want.
This is the return trip of the ComfyUI-Equirect pack. Its sibling, Equirectangular to Cubemap, slices a panorama into six faces for skybox rendering; this node goes the other way. Think of it as the final stitch before you drop the image into a panorama viewer or an environment-map-aware workflow. The 360-generation corner of ComfyUI lives and dies on this round-trip - if you can't get your output back into equirect form, it's useless for VR or as an HDRI.
How it works
The node takes your six faces, glues them into the standard "cross" (dice) layout, and hands the whole thing to the py360convert library, which does the heavy per-pixel remapping from cube coordinates to spherical. When the library isn't available, it falls back to a pure-Python per-pixel sampler. That fallback is correct but glacially slow - one output pixel at a time - so you want py360convert installed.
Output width is always exactly double the height (the 2:1 rule that defines equirectangular), so you never set a width. Set output_height, and width follows.
The inputs that matter
front,right,back,left,top,bottom- six IMAGE inputs, one per cube face. Order matters. The code arranges them as front→right→back→left along the horizontal ring, with top and bottom on top. If you wire faces in the wrong order, your panorama comes out scrambled. The pack's ownEquirectToCubemapnode outputs in exactly this order, so front→front, right→right, and you're done.output_height- INT, default 1024, range 64–8192. Higher output = more panorama detail, but also more memory and a slower conversion. As a rule of thumb, match it to roughly twice your face size; converting 512px faces to an 8192px-tall panorama just upscales nothing but your VRAM bill.
The single output, equirect_image, is a normal IMAGE you can feed straight into a Save Image / Preview, or into any node that takes an equirectangular panorama.
Install
Easiest via ComfyUI Manager - search ComfyUI Equirectangular Tools and install. Manual is just as easy:
cd ComfyUI/custom_nodes
git clone https://github.com/kukuo6666/ComfyUI-Equirect
cd ComfyUI-Equirect
pip install -r requirements.txt
Then restart ComfyUI. Requirements are torch, numpy, pillow, opencv-python, and py360convert - all light, no model downloads, no checkpoint files.
Where people get burned
- Missing
py360convertmeans the node doesn't appear at all. The README advertises an automatic fallback, and there is one in the code - but the library is imported at module load, so if pip didn't install it, the node fails to register and you see an import error instead of a fallback. The fix is simplypip install py360convert(or clone andpip install -e .from the py360convert repo if that fails). - All faces must be the same size. The node throws a
ValueErrorif any face has different dimensions, and it will not resize for you. If your faces came out of different nodes at different resolutions, normalize them first. - "Batch support" is optimistic. The README and release notes claim batch processing, but the code actually grabs only the first frame of each face (
face[0]) and converts that. Feed it a multi-image batch and you'll silently get just the first panorama. If you need true batching, loop it or split the batch. - Mismatched face order scrambles everything. Symptom: seams that don't line up, or a scene that looks mirrored. Re-check which face is front.
It's a small, single-purpose pack with one job, and it does that job fine. If you're doing 360° environment work in ComfyUI, this is the node that closes the loop.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| cubemap | CUBEMAP | — | |
| output_width | INT | 2048512–8192 | Output panorama width (typically 2x height) |
| output_height | INT | 1024256–4096 | Output panorama height |
| output_type | COMBO | Choose to render RGB, depth-only, or combined RGBD |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |