Equirectangular Resize
1 ratio — no stretched poles
- image
- resized_image
Resizing an equirectangular image sounds like a solved problem until you remember the format's one hard rule: it's supposed to be exactly 2:1. Width twice the height. Break that and the panorama plays back distorted - the whole sphere smears sideways, and the poles stretch into blobs. Equirectangular Resize is the node that keeps you honest about that rule while you change size.
The default behavior is maintain_aspect: true, which means you give it one dimension and it keeps the 2:1 ratio for you. Set output_width: 2048 and it produces 2048×1024; set output_height: 1024 and it produces 2048×1024. You can't accidentally create a broken panorama with the defaults - which is exactly what you want when you're batch-processing or wiring it into a pipeline that expects standard geometry.
How it works
Under the hood it's OpenCV's cv2.resize - the same interpolation machinery used across the pack - with the aspect math handled before it gets there. When maintain_aspect is on, the node computes the paired dimension as width / 2 (or height × 2) and ignores whichever dimension you didn't set. Turn maintain_aspect off and it resizes to exactly the width and height you give it, distortion be damned - useful if a tool downstream requires a weird aspect, but you've been warned.
The interpolation choices map to OpenCV filters: lanczos, bicubic, bilinear, nearest. Lanczos is the default and the right one for shrinking big panoramas or upscaling for detail work; nearest is for pixel-art-grade speed where sharp edges beat smoothness.
Inputs that matter
image(required) - equirectangular tensor (B,H,W,C) in [0,1].output_width(default 2048) /output_height(default 1024) - the target size. With aspect maintenance on, only one of these does the driving.maintain_aspect(default on) - the knob that keeps the 2:1 rule.interpolation- lanczos default.
Output is a single resized_image.
Installing it
The standard LatLong pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/cedarconnor/comfyui-LatLong
cd comfyui-LatLong
pip install -r requirements.txt
Or ComfyUI Manager → search "LatLong" → restart. Node under LatLong. Deps: numpy, opencv-python, scipy, torch, Pillow; no model files.
Gotchas
The one trap is the lazy resize people do with the plain Image Resize node from core ComfyUI - it happily gives you a non-2:1 panorama and the viewer shows a squished world. This node exists so that doesn't happen, but the safety only works while maintain_aspect stays on. If you disable it for a custom aspect, don't be surprised when the scene comes out stretched; that's you taking the safety off.
Also: downscaling is where lanczos matters most. If you're shrinking a 16K panorama to preview size, you'll see the difference between lanczos and bilinear in the fine texture almost immediately.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Equirectangular input image tensor (B,H,W,C) in [0,1]. | |
| output_widthopt | INT | 2048128–8192 | Target width in pixels. |
| output_heightopt | INT | 102464–4096 | Target height (ignored if maintain_aspect is enabled; auto-calculated as width/2). |
| maintain_aspectopt | BOOLEAN | true | Preserve 2:1 aspect ratio (standard equirectangular). Disable for custom dimensions. |
| interpolationopt | COMBO | lanczos | Resampling quality: lanczos (highest), bicubic, bilinear, nearest (fastest). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| resized_image | IMAGE | — |