Create 180 To 360 Mask
Tell the inpaint exactly which half of the pano is real
- image
- Equirectangular Mask
When you pad a 180° panorama up to 360°, you create a problem the model can't see: half the image is now real content and half is a flat empty fill, but the inpaint has no way to know which is which. If you just ask the model to "fill in the rest," it may try to edit your real content too, because without guidance every pixel is fair game. Create 180 To 360 Mask exists to draw that boundary for you - it produces a mask that marks exactly where the real content lives, so you can feed it to an inpaint and only the blank half gets generated.
It's the dedicated partner to Pad 180 to 360 Equirectangular. Together they're the pack's "turn a half-pano into a full one" pipeline.
How it works
It inspects the image's width and builds a mask where the "real" region is 1.0 and everything else is 0.0. The wrinkle is the input_mode:
180(default) - the input is a 180° image, so the valid region is the full width. The mask marks the left half as real and the right half (the padding you're about to add, or already added) as empty.360- the input is already a full 360, so the valid region is only half of the width. It automatically treats the width as if it were halved, marks the real half, and produces a mask sized for the full 360 image.
The feather input (in pixels, default 0) softens the boundary between the 1.0 and 0.0 regions with a gradient ramp instead of a hard edge - turn it on (something like 10–30 px) when you're inpainting so the transition between generated and original content blends instead of leaving a visible line.
Output is a single Equirectangular Mask (MASK tensor), sized to match the image, ready to wire into any inpaint or masked-composite node.
The workflow
Pad 180 → 360 → Create 180 To 360 Mask → feed the mask to an inpaint. The mask makes the inpaint a pure outpaint of the blank hemisphere while the original half stays locked. If your inpaint keeps trying to redraw content it shouldn't, check that the mask is oriented right - flip it or switch input_mode and you'll see the white region move to the other half.
Install
The pack installs via ComfyUI Manager (search "ComfyUI_pytorch360convert") or git clone https://github.com/ProGamerGov/ComfyUI_pytorch360convert into ComfyUI/custom_nodes, then restart. The pack's requirements.txt is empty, so you'll likely need python -m pip install pytorch360convert yourself. No models or downloads - mask generation is pure tensor math, effectively instant.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| input_mode | COMBO | 180 | 2 options: 360, 180 |
| feather | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Equirectangular Mask | MASK | — |