Equirectangular Crop Square
Cut the panorama down to the middle
- image
- square_image
Sometimes you don't want a fancy re-projection, you just want a square. Equirectangular Crop Square is the unglamorous utility of this pack: it center-crops an equirectangular image down to a perfect square by cutting the width until it matches the original height.
That's the entire job. A standard 2:1 equirectangular is twice as wide as it is tall, so this node takes the middle slice - the vertical band that runs through the center of the frame, from the top pole region down to the bottom - and throws the sides away.
How it works
It's a plain center crop: square_size = min(H, W), cropped from the horizontal middle. No re-projection, no spherical math, no resampling of the pixels themselves. That means the interpolation input genuinely does nothing for the pure crop - the README is upfront that it's kept for consistency so the node's interface matches its siblings. The output is simply the same pixels you'd see if you cut the middle column of the panorama.
Why you'd use it
Square is the format of choice for a lot of social platforms, thumbnails, and upscaling pipelines that expect a power-friendly square tensor. It's also a handy consistency tool: run every panorama through this and every result is the same square geometry regardless of source resolution, which makes downstream batch upscaling or comparison work trivial.
The honest caveat is what you're not getting. This is the middle of the sphere as a rectangle - the horizon sits at the vertical center, and the top and bottom of the square are the poles, where equirectangular projection stretches pixels most. If you wanted a nice square view (a perspective-looking picture, or a corrected "one wall of the room" framing), this isn't that node. Crop Square is raw pixels; Perspective Extract is the one that makes it look like a photo someone actually took.
Inputs and outputs
image(required) - equirectangular tensor (B,H,W,C) in [0,1].interpolation- exists for interface consistency; the pure crop doesn't resample, so leave it on the defaultlanczos.
Output is a single square_image.
Installing it
Install the LatLong pack via ComfyUI Manager (search "LatLong"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/cedarconnor/comfyui-LatLong
cd comfyui-LatLong
pip install -r requirements.txt
Restart ComfyUI. Node under LatLong. Deps: numpy, opencv-python, scipy, torch, Pillow - no models to download.
Gotchas
The only real surprise is the one above: this is a dumb crop, not a perspective correction, and the interpolation parameter is cosmetic here. If you cropped and the poles look stretched or the scene looks "wrong," that's the projection doing its thing - and the fix is Perspective Extract, not a different interpolation setting. Also note that if your source is not a standard 2:1 panorama, the square simply takes the smaller dimension, so feeding it a tall image loses the middle instead of the sides.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Equirectangular input image tensor (B,H,W,C) in [0,1]. | |
| interpolationopt | COMBO | lanczos | Not used for pure center-crop; included for consistency. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| square_image | IMAGE | — |