Image_Panorama_Seam
Roll the panorama and mark the seam for inpainting
- image
- image
- mask
Every equirectangular panorama has an ugly secret: the left and right edges are the same point in the world, and if they don't line up you get a visible seam. Image_Panorama_Seam exists to fix exactly that. It takes a 2:1 panorama and outputs two things: the same image rolled horizontally so the seam sits wherever you want it, and a mask that marks the seam band. Feed the rolled image and the mask into an inpaint pass and the join disappears.
It's the natural second half of the pack's panorama pair - Image_Panorama builds the 2:1 canvas, this node positions and exposes the seam so a model can heal it. If you've ever hand-drawn a mask over a panorama seam in an image editor, this is that step as a node.
How it works
The implementation is straightforward and deterministic:
- The image is doubled horizontally (image + itself concatenated), then a window exactly the width of the original is cut out starting at
width/2 - seam_center_offset. Net effect: the panorama is rolled so a chosen column becomes the new left edge. - A band mask is built spanning
seam_width_pxcentered on the seam position (plus the offset), expanded across the full height and batch. That's your inpaint region.
Because it's pure tensor slicing, it's instant and fully reproducible - same inputs, same output, every time. No model, no randomness.
Inputs and outputs
- image (IMAGE) - the panorama to roll. Ideally 2:1, though it won't refuse anything.
- seam_width_px (INT, default 64) - how wide the seam band is. Wider = safer inpaint region but more of the image gets rewritten; 64 is a sensible start.
- seam_center_offset_px (INT, default 0) - shifts where the seam sits, from -2048 to +2048. Negative shifts left, positive shifts right. This is how you dodge a seam that would land on a face or a busy texture: roll it somewhere boring first.
Outputs: image (the rolled panorama) and mask (the seam band as a MASK). Wire both into your inpaint/enhance step.
Installing it
Part of ComfyUI-Apt_Preset:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
# install.bat or pip install -r requirements.txt, restart
Or ComfyUI Manager → search "ComfyUI-Apt_Preset".
Where people get burned
The order of operations matters. Roll the image and mask it before you inpaint, then roll the inpainted result back if you want the original orientation - or just keep the rolled version, since for a true 360° texture the seam position is arbitrary anyway. Don't inpaint first and roll after, or you'll just relocate the seam you already healed.
Also watch the mask's tightness: if seam_width_px is too narrow for your model's attention window, the inpaint will leave a visible repeat. Wider is safer. And if your source panorama's left/right edges already match perfectly, you don't need this node at all - but if you're here, yours probably don't.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| seam_width_px | INT | 641–2048 | — |
| seam_center_offset_px | INT | 0-2048–2048 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |