Nodes/ComfyUI_pytorch360convert/Equirectangular to Face
ComfyUI Node

Equirectangular to Face

Pull one face out of the pano — the Down face is where your tripod hole lives

By ProGamerGov·Created 2 years ago·Updated 11 months ago· 37
Equirectangular to Face
  • e_img
  • Face Image
face_width-1
padding_modebilinear
cube_faceFront

Sometimes you don't want to convert the whole panorama to a cubemap. You want one face of it. That's this node: Equirectangular to Face (E2Face) converts an equirectangular image and pulls out a single cube face - Front, Right, Back, Left, Up, or Down - as a flat square image you can process like any normal picture.

Why is that useful? Because of what lives on the Down face. The nadir - the ground directly below a 360 camera - is the part of every pano that's broken: a tripod hole, a shadow, stitching artifacts. And it's the one region that's a pain to fix in equirectangular space because it's a stretched smear at the bottom of the frame. Pull the Down face out, and that same region becomes a clean flat square you can inpaint with normal tools. Same story for the Up face (sky), where generators love to drop blobs.

How it works

It runs the image through e2c from pytorch360convert as a cubemap dict, then returns whichever face you picked from cube_face. Inputs:

  • e_img - the equirectangular image.
  • face_width - the face edge length in pixels. Default -1 = half the image height, the standard size.
  • cube_face - which of the six faces to extract (Up, Down, Right, Left, Front, Back), default Front.
  • padding_mode - sampling mode, bilinear default.

Output is Face Image, a single flat square.

The workflow

This is the surgical alternative to full E2C: extract the Down face, inpaint away the tripod hole or regenerate the ground, then send the fixed face back in with the pack's Face to Equirectangular node, which places it back into the pano (the other faces are filled with a flat base_equi_color, so you'd composite the returned pano over your original - or use the mask nodes if you want only the changed region applied). The Equirectangular Mask to Face / Face Mask to Equirectangular pair does the same dance for masks, so you can keep your inpaint mask aligned through the round trip.

Two practical notes. The face is a projection resample, so a 1024-wide Down face is the quality you get - extract at a generous face_width if you plan to inpaint and reinsert, since that's where your detail budget lives. And a face is a flat image, so anything you can do to a normal image (ControlNet, upscale, face-fix) works on it without the distortion fighting you.

Install

Same pack install: ComfyUI Manager → "ComfyUI_pytorch360convert", or git clone https://github.com/ProGamerGov/ComfyUI_pytorch360convert into ComfyUI/custom_nodes and restart. The requirements.txt is empty, so python -m pip install pytorch360convert is usually required by hand. No model downloads.

Categorypytorch360convert/equirectangular

Inputs (4)

NameTypeDefaultDescription
e_imgIMAGE
face_widthINT-1
padding_modeCOMBObilinear3 options: bilinear, bicubic, nearest
cube_faceCOMBOFront6 options: Up, Down, Right, Left, Front, Back

Outputs (1)

NameTypeDescription
Face ImageIMAGE