Nodes/ComfyUI-Apt_Preset/Image_Panorama
ComfyUI Node

Image_Panorama

1 equirectangular panorama

By cardenluo·Created 2 years ago·Updated 7 days ago· 331
Image_Panorama
  • image
  • image
output_preset2048 x 1024
top_padding256
bottom_padding256
bg_color#00ff00

If you've ever needed an image that wraps around the inside of a sphere - for a 360° viewer, a Skybox texture, an equirectangular inpainting workflow, or a video model that eats 2:1 panoramas - you know the pain of producing one from a normal flat render. Image_Panorama takes a regular image (or a batch of them) and re-projects it into an equirectangular panorama at a standard 2:1 aspect ratio. One input, one output, no model, no downloads.

It sits in the pack's imgEffect category, and in practice it's the front half of a panorama workflow: you turn your source into an equirect canvas, generate the rest of the world with whatever you're using, and the pack's companion Image_Panorama_Seam node handles the visible join.

How it works

It's pure math, which is why there's no model involved. Each input frame is treated as a perspective image and projected onto a 2:1 equirectangular canvas using a proper pinhole-camera model - the node builds a camera basis from yaw/pitch, computes each output pixel's direction vector, and bilinearly samples the source image for pixels that fall inside the view. Everything outside the source frame is filled with your bg_color.

The controls are the interesting part:

  • output_preset - 1024 x 512, 2048 x 1024, or 4096 x 2048. This sets the canvas width; height is always half of it (true 2:1).
  • top_padding and bottom_padding (default 256 each) - this is the clever bit. Padding isn't just a border; it changes the effective vertical field of view. More padding means the source image occupies a smaller slice of the 180° vertical range, which shifts the pitch and changes how much of the scene's surroundings you're claiming. It's how you tell the model "there's a whole sky and floor around this image."
  • bg_color (default #00ff00) - the fill for the empty area. Green is a sensible default: it's easy to mask out for inpainting later.

One input image, one output image. Batches pass through frame by frame, so a stack of frames each becomes its own panorama.

Installing it

It's 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 most common mistake is cranking top_padding/bottom_padding to huge values expecting a bigger canvas - it's not a resize knob, it's a field-of-view knob, and it's clipped to the output height anyway. If your source just looks stretched, reduce the padding so the source fills more of the vertical range.

Second: the output is 2:1 by construction, and 4096×2048 is a lot of pixels to push through a diffusion model if you're inpainting the empty zone. Start at 2048 x 1024 and only go up if the seams bother you.

And a note on the green default: if you use a different bg_color for aesthetic reasons, remember the green was there so you could mask the empty region cleanly. Whatever color you pick, that region is what Image_Panorama_Seam and an inpaint pass are for.

CategoryApt_Preset/imgEffect

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
output_presetCOMBO2048 x 10243 options: 1024 x 512, 2048 x 1024, 4096 x 2048
top_paddingINT2560–4096
bottom_paddingINT2560–4096
bg_colorSTRING#00ff00

Outputs (1)

NameTypeDescription
imageIMAGE