Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > comfyui-LatLong

ComfyUI Extension: comfyui-LatLong

Repo Name

comfyui-LatLong

Author
cedarconnor (Account age: 5169 days)
Nodes
View all nodes(1)
Latest Updated
2026-09-16
Github Stars
0.0K

How to Install comfyui-LatLong

Install this extension via the ComfyUI Manager by searching for comfyui-LatLong
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui-LatLong in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

comfyui-LatLong Description

comfyui-LatLong adds ComfyUI tools to rotate, crop, convert, extend, and preview 360° panoramas, with perspective editing, cubemap conversion, seam repair, HDR handling, and animation.

comfyui-LatLong Introduction

comfyui-LatLong adds panorama tools to ComfyUI. It helps you rotate, crop, convert, extend, and preview 360° images, especially equirectangular panoramas: wide images that represent the scene in every direction around a viewer.

An ordinary image editor can make panorama work awkward. The left and right edges of a 360° image meet when the image is viewed, so an edit that looks fine on a flat canvas may reveal a visible seam. The top and bottom also represent the poles, where image distortion can make editing difficult. comfyui-LatLong provides nodes designed around those properties.

You can use it to:

  • Turn a panorama toward a different viewing direction or extract a conventional camera view.
  • Edit or outpaint a region, then place the result back into the panorama.
  • Convert between equirectangular images and several cubemap layouts.
  • Create masks for seams and poles, inspect potential defects, and blend the wrap boundary.
  • Work with floating-point HDR imagery without clipping its values.
  • Preview, compare, or animate panoramas inside ComfyUI.

How comfyui-LatLong Works

Think of an equirectangular panorama as a map of the world around a camera. Moving horizontally changes the direction you face; moving vertically changes how far you look up or down. The left and right edges represent neighboring directions, even though they appear far apart on the flat image. That is why operations such as rotation and cropping need to account for the wrap.

The extension provides several ways to work with that map:

  • Rotation changes which direction appears at the center of the panorama. You can adjust yaw (turn left or right), pitch (tilt), and roll (lean), with angles measured in degrees.
  • Perspective extraction creates a familiar, rectangular camera view from a chosen direction and field of view. It is useful when you want to edit one part of a panorama as though it were a regular picture.
  • Projection reinsertion maps an edited perspective patch back onto the panorama using the settings saved during extraction.
  • Cubemap conversion divides the surrounding scene into six square views: front, back, left, right, up, and down. These can be easier to inspect or edit individually.
  • Masks and blending help you target areas such as the wrap seam or poles and soften selected transitions.

At zero camera angles, a perspective extraction looks toward the panorama’s front at the equator. Its field of view is horizontal: a wider value shows more of the surroundings, while a narrower value focuses on a smaller area. Longitude wraps at the left and right edges; the north and south edges do not wrap into one another.

comfyui-LatLong Features

Rotate, Crop, and Resize Panoramas

Equirectangular Rotate changes yaw, pitch, roll, and horizon offset. For a quick directional change, Equirectangular Rotate (Preset) offers front, back, left, right, up, and down views with optional offsets. Equirectangular Processor (All-in-One) combines rotation with optional cropping; when both of its crop choices apply, the square crop takes precedence.

Equirectangular Crop 180 selects a longitude window with an adjustable center and field of view. Use it when you need to focus on a portion of the scene while accounting for the panorama’s horizontal wrap. Equirectangular Crop Square makes a centered crop whose width matches the input height. Separate nodes provide horizontal or vertical flipping and resizing, including an option for a 2:1 output aspect ratio.

Rotation offers CPU/GPU and tiling controls. Tiling limits the size of intermediate working areas, which can help with large images, but it does not eliminate the memory needed to hold the input and output images.

Extract and Reinsert a View

Equirectangular Perspective Extract produces a rectangular view from a selected direction. For an editing workflow that needs to return to the full panorama, use:

LatLong Extract Projection → edit the patch → LatLong Reinsert Projection

Extraction supplies the patch, a full-panorama coverage mask, and a projection context. Reinsertion uses that context to place your edited patch back at the saved yaw, pitch, roll, and field of view. You may upscale a patch before reinserting it, provided its aspect ratio stays the same. Keep the context connected through the workflow: it stores the placement information, not a hidden copy of the original panorama.

Convert Cubemaps

The extension can convert between an equirectangular panorama and a six-face cubemap. Nodes include:

  • Equirectangular to/from Cubemap for the legacy 3×2 atlas.
  • Cubemap Faces Extract for separate left, front, right, back, top, and bottom outputs.
  • Flexible cubemap converters for 3×2, cross/dice, horizontal-strip, and six-face-stack layouts.
  • Stack / Split Cubemap Faces for moving between individual faces and a stack in an explicit face order.
  • LatLong Cubemap Preset for importing or exporting known layouts, with an optional reversible vertical face flip.

The legacy 3×2 atlas places [left, front, right] in its first row and [back, top, bottom] in its second. Face names can be written in full or abbreviated as F, R, B, L, U, and D. These presets describe image layouts; they do not promise automatic conversion to undocumented axis conventions used by other software.

Mask and Repair Sensitive Areas

Create Seam Mask selects a strip around the panorama’s wrap boundary. You can feather it for a softer selection or roll it by half the image width to work at a different horizontal position. Create Pole Mask targets the north or south of an equirectangular image, or circular areas on cubemap faces. Roll Image / Roll Mask moves content around the horizontal wrap without resampling it.

Equirectangular Edge Blender adjusts the two sides of the wrap boundary to match while tapering the correction toward the untouched interior. LatLong Diagnostics supplies a color overlay and JSON measurements for wrap mismatch, joins at selected edge bands, and variation in polar rows. Red marks wrap edges, amber marks band joins, and cyan marks poles. These measurements can help locate something to inspect, but they cannot decide whether an image looks good.

Apply Circular Padding Model / VAE changes the padding behavior of compatible convolution layers along the horizontal axis, or along both axes when selected. It affects Conv2d layers only. It does not guarantee seamless output from every diffusion model, VAE architecture, or later workflow step.

Outpaint a Panorama

The outpainting workflow is:

Outpaint Setup → your inpainting step → Outpaint Stitch

Setup creates a placed image, a mask showing what should be inpainted, and a stitch context. In these masks, 1 means selected for inpainting unless an output is specifically identified as coverage.

In 2D mode, scale multiplies the source size in pixels. Horizontal placement wraps across the panorama boundary, while vertical placement is clipped. In perspective mode, scale changes the angular area covered by the view rather than simply enlarging its source pixels. This means increasing scale can change what directions the placed content covers. Perspective feather is measured in source pixels.

Stitch recreates the placed layer at the output resolution. Choose alpha for a normal blend, overlay for the overlay color-blending effect under the mask, or hard to paste without feathering.

Preserve HDR Values and Make Previews

The original transform nodes return float32 images clipped to values from 0 to 1. If your workflow uses scene-linear or HDR values that may be negative or greater than 1, use LatLong Float Processor for rotation, perspective work, cubemap conversion, or resizing without that clipping. Export encoding remains the responsibility of later workflow steps.

LatLong Tone Map Preview creates a display-friendly preview using exposure adjustment, Reinhard tone mapping, and linear-to-sRGB conversion. Connect it to preview nodes while keeping the original HDR branch for your final output.

Animate and Inspect Results

LatLong Animated Rotation creates frames from JSON keyframes. For example, [{"frame":0,"yaw":0},{"frame":29,"yaw":90}] moves from 0° to 90° yaw over the specified frame range. The node interpolates rotations along a shortest path, holds the end values outside the keyframe range, and cycles the input batch when it produces more frames than there are input images.

Preview 360 Panorama displays the first image in a batch. Drag to look around and use the wheel to zoom. Preview 360 Video Panorama adds play/pause and an exact frame-index slider. LatLong Compare Panorama shows before-and-after images or matching batches through a shared camera and wipe slider; a single image on one side remains visible across the other side’s sequence.

The preview uses a bundled copy of Three.js, so viewing does not depend on a CDN connection. Long or high-resolution video batches can still consume substantial host memory.

What's New with comfyui-LatLong

Version 2.1

Version 2.1 includes geometry corrections, workflow additions, and preview improvements:

  • More consistent rotation: CPU and GPU now use the same mixed-angle rotation convention. Neutral and integer-pixel yaw rotations preserve pixels.
  • Aligned perspective views: Extraction faces the equator at zero angles and uses the same camera basis as insertion. Older workflows involving mixed-angle GPU rotations or perspective extraction may therefore produce different results.
  • Corrected edge sampling: Longitude wraps without treating the north and south poles as connected.
  • Clearer filter and device behavior: Bicubic and Lanczos filtering run on the CPU. Explicitly requesting either with GPU produces an error; automatic device selection considers filter support and available video memory.
  • Improved large-image processing: Rotation uses bounded working bands, and CPU source tiles avoid OpenCV’s 32,767-pixel source limit. Cubemap reconstruction is vectorized and supports all four interpolation modes.
  • Better seam and outpaint controls: Edge blending tapers into the untouched image. Perspective outpaint scale now changes angular coverage. Stitching offers alpha, overlay, and hard modes, and 2D patches wrap horizontally.
  • More responsive previews: Viewers release unused textures and WebGL resources, discard outdated loads, pause rendering while hidden, and support playback controls and scrubbing.
  • Eight additional workflow nodes: These add float processing, tone-mapped previews, reusable projections, diagnostics, comparison, animation, and cubemap presets.

Version 2.1 retains existing node names and output sockets. Its overlay stitch option now performs the standard overlay blend; choose hard if you need a paste without feathering. Circular-padding nodes now register changes through ComfyUI’s model patcher: inplace=False clones the patcher rather than duplicating all model weights, while inplace=True modifies the supplied patcher.

Troubleshooting comfyui-LatLong

A seam appears where the panorama wraps

  1. View the result in Preview 360 Panorama, since the connection between the flat image’s edges is easier to judge there.
  2. Use LatLong Diagnostics to locate possible wrap mismatch.
  3. If the problem is at the boundary, try Equirectangular Edge Blender and inspect the result again.
  4. For a selective edit, use Create Seam Mask to confine work to the relevant strip.

Diagnostics identify potential defects; always judge the final appearance in the viewer.

A perspective edit returns in the wrong place or looks distorted

  1. Confirm that LatLong Reinsert Projection receives the context from the corresponding LatLong Extract Projection operation.
  2. Keep the edited patch’s aspect ratio unchanged, even if you increase its resolution.
  3. Review the yaw, pitch, roll, and horizontal field of view used for the extraction.

A large panorama is slow or runs out of memory

  1. Try a smaller resolution or batch while developing the workflow.
  2. Enable tiling for rotation, or use automatic device selection when appropriate.
  3. Account for the memory used by the input, output, other nodes, and any stacked batch images.

For scale, a single 16,384 × 8,192 RGB float32 image requires about 1.5 GiB; the input and output alone require about 3 GiB. Tiling reduces intermediate working buffers, not the size of those full images.

Bicubic or Lanczos filtering fails on GPU

Use the CPU for that operation, or select a GPU-supported filter. If you choose automatic device selection, the extension considers filter compatibility and available video memory.

HDR highlights or other values are clipped

Use LatLong Float Processor for transformations that must preserve values outside 0–1. Use LatLong Tone Map Preview on a separate preview branch, keeping the original floating-point branch for output.

The preview video runs slower than the requested frame rate

Playback waits for frames to decode and may run below the requested FPS. Try a shorter or lower-resolution batch when checking an edit. The video preview also retains encoded frame URLs in its UI payload, so a very long batch can use considerable host memory.

Frequently Asked Questions

Does this extension include its own image-generation models?
The documented features are workflow nodes and image operations, not a set of bundled generation models. The circular-padding nodes patch compatible convolution layers in a supplied model or VAE; they are not separate generation models.

Will circular padding make every panorama seamless?
No. It changes padding for Conv2d layers only. Transformer models, some VAE architectures, and downstream operations may still produce visible seams.

Can I edit cubemap faces in another program’s layout?
You can work with the listed layouts and face orders, including a reversible vertical flip in presets. Check orientation when exchanging images with other software: the presets do not claim undocumented engine-specific axis conversions.

Can I upscale a perspective patch before reinserting it?
Yes, as long as you preserve its aspect ratio and pass along its projection context.

What does a value of 1 mean in an outpaint mask?
It marks the area selected for inpainting, unless the output is explicitly named as a coverage mask.

Learn More about comfyui-LatLong

  • Validation notes document measured results and limits. Hardware performance varies, so treat the measurements as examples rather than guaranteed processing times.
  • License and Notice provide the extension’s Apache-2.0 licensing information. The bundled Three.js has its own MIT license.

comfyui-LatLong Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

comfyui-LatLong detailed guide | ComfyUI