Create Pole Mask
The zenith and nadir are a mess — here's the mask to fix them
- image
- Pole Mask
Every equirectangular image has two guaranteed problem zones: the very top and the very bottom, the zenith and the nadir. In the 2:1 projection, a whole hemisphere's worth of sky gets squeezed into the top rows, and the ground below the camera becomes a stretching smear. Generators hate these regions - you'll see blobs, smeared geometry, or a tripod hole where the pano's "floor" should be. The standard fix is inpainting, and to inpaint you need a mask that covers the pole region.
Create Pole Mask builds that mask in two flavors, depending on where you're doing your work. The face mode draws a circle mask on a single cube face - because in cubemap space the poles are the Up and Down faces, and a circle centered there covers the pole distortion cleanly. The equirectangular mode does the fancier thing: it creates circle masks on the Up and Down faces, then warps them back through cubemap→equirect conversion so you get a mask that's already positioned over the poles of the pano.
Inputs
- image - reference image (used for sizing; the mask matches its dimensions).
- circle_radius - radius as a fraction (0.0–1.0) of the max possible radius, default 0.1. 1.0 = the circle touches the edges of the face.
- pixel_radius - radius in pixels; if greater than 0 it overrides
circle_radius(per the tooltip). Handy when you know exactly how big the artifact is. - feather - smooths the mask edge over N pixels so the inpaint blends instead of leaving a hard circle line.
- mode -
face(default) orequirectangular, as described above.
Output is Pole Mask, a MASK tensor.
How it works
In face mode it's a centered circle on the face image - simple and predictable. In equirectangular mode it runs the image through an e2c conversion to get Up/Down faces, stamps a circle mask on each, then c2es the masked cubemap back to a pano-sized mask. That's a couple of resamples, so expect it to look slightly soft around the mask edges compared to a hard-drawn circle - that's the projection doing its thing, and it's fine.
When you'd use each mode
If you're doing your pole work in cubemap space - which is the better place, because a face is a flat square with no distortion - use face mode and inpaint the circle on the Up or Down face directly. If your whole pipeline is in equirectangular space, equirectangular mode hands you a mask that's already draped over the poles, and you can combine it with Create Seam Mask to fix both problem zones at once.
Install
Standard 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 - mask generation is pure math.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| circle_radius | FLOAT | 0.10 | — |
| pixel_radius | INT | 0 | Size of the radius in pixels. If > 0, circle_radius is ignored in favour of pixel_radius. |
| feather | INT | 0 | — |
| mode | COMBO | face | 2 options: face, equirectangular |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Pole Mask | MASK | — |