ComfyUI Node

Equirectangular Rotate (Preset)

Front, back, up, down — point your panorama at the standard views instantly

By cedarconnor·Created about a year ago·Updated 7 months ago· 2
Equirectangular Rotate (Preset)
  • image
  • rotated_image
presetfront
yaw_offset0.0
pitch_offset0.0
roll_offset0.0
horizon_offset0.0
interpolationlanczos
backendauto

The full Equirectangular Rotate node asks you to reason in degrees. The Preset version asks you to pick a direction: front, back, left, right, up, or down. Same underlying rotation, zero guesswork.

It's for the workflow where you know roughly where you want the view pointing and just need it there - orient a panorama so the entrance is dead ahead, flip it to face the opposite wall, or spin it straight up at the ceiling for a look at the sky. You pick the preset, it applies the rotation, and you're already looking the right way before you've typed a single angle.

How it works

Under the hood it's a thin wrapper around the same spherical rotation engine as the main Rotate node - scipy builds the rotation matrix from the preset's angles, the image is inverse-remapped with OpenCV (or torch.grid_sample on the GPU path, bilinear/nearest only). The preset table is in the source:

  • front - (0°, 0°, 0°), no rotation
  • back - yaw 180°
  • left - yaw −90°
  • right - yaw +90°
  • up - pitch +90°
  • down - pitch −90°
  • custom - (0,0,0), i.e. hand everything over to the offsets

Then your offset fields ride on top. yaw_offset, pitch_offset, roll_offset fine-tune the preset by that many degrees, and horizon_offset shifts the horizon line vertically. So "back, plus a bit to the right" is back preset + yaw_offset: 15, no mental math.

Inputs that matter

  • image (required) - equirectangular tensor (B,H,W,C) in [0,1].
  • preset - the view direction, default front.
  • The four offsets - all default 0. horizon_offset is positive = horizon up, same convention as the main node.
  • interpolation (lanczos default) and backend (auto/cpu/gpu) - same semantics as the main Rotate node, including the "GPU only does bilinear/nearest" caveat.

Output is a single rotated_image, exactly like the main node.

Installing it

Part of the LatLong pack - 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 lives under LatLong. Deps: numpy, opencv-python, scipy, torch, Pillow. No model files.

Gotchas

Not much to trip on here, which is the point. Two small things: up and down slam you straight to the poles, where equirectangular resolution is thinnest - if the ceiling or floor looks soft, that's the projection, not the node. And if you find yourself permanently adding offsets on top of a preset, you're really using the wrong node; the plain Rotate gives you direct yaw/pitch/roll with no preset indirection. Presets are for quick orientation, not for sculpting a final angle.

CategoryLatLong

Inputs (8)

NameTypeDefaultDescription
imageIMAGEEquirectangular input image tensor (B,H,W,C) in [0,1].
presetoptCOMBOfrontQuick preset views: front (0°), back (180°), left (-90°), right (90°), up/down (±90° pitch).
yaw_offsetoptFLOAT0.0-180–180Fine-tune yaw: additional horizontal rotation applied to preset (degrees).
pitch_offsetoptFLOAT0.0-90–90Fine-tune pitch: additional vertical tilt applied to preset (degrees).
roll_offsetoptFLOAT0.0-180–180Fine-tune roll: additional banking rotation applied to preset (degrees).
horizon_offsetoptFLOAT0.0-90–90Vertical horizon shift: positive moves horizon up (degrees).
interpolationoptCOMBOlanczosResampling quality: lanczos (highest), bicubic, bilinear, nearest (fastest).
backendoptCOMBOautoProcessing backend: auto uses GPU if available (bilinear/nearest only on GPU).

Outputs (1)

NameTypeDescription
rotated_imageIMAGE