Nodes/ComfyUI_StarNodes/⭐ Star Save Panorama JPG+
ComfyUI Node

⭐ Star Save Panorama JPG+

Save Panorama JPG+ — the panorama saver that also builds 3D

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Save Panorama JPG+
  • images
  • depth_map
  • image
  • 3d_image
subfolder
filenamepanorama
quality95
stereo_3dfalse
stereo_layoutSBS
depth_scale5.0
invert_depthfalse
gap_fillInpaint
base_path

The plain Star Save Panorama JPEG is the "make my 360 image viewable" node. Star Save Panorama JPG+ is that same node, plus a party trick: feed it a depth map and it will generate a stereoscopic 3D version of the panorama - side-by-side or top/bottom - alongside the normal metadata-tagged JPEG. If you're building 360 worlds and want people to actually feel the depth instead of just panning around a flat wrap, this is the one to reach for.

How it works

Two separate jobs run in one node. First, the standard panorama save: each image is written as a JPEG with the Google GPano XMP block injected into the file (same trick as the plain node, cylindrical projection). Second, if stereo_3d is on and you've connected a depth_map, it builds a second image by shifting pixels horizontally in proportion to depth - closer stuff shifts more, far stuff less - and packs the result into the layout you picked. Gaps left by the shifting are filled with OpenCV inpainting (cv2.inpaint, TELEA), which is why gap_fill defaults to "Inpaint" rather than "None": the inpaint pass is what makes the stereo view look clean instead of torn.

Because the depth-to-shift math runs through OpenCV, opencv-python is a hard dependency for the stereo part. It's in the pack's requirements.txt, so a normal install covers you.

Inputs that matter

  • images - the panorama batch.
  • quality - JPEG quality, default 95.
  • stereo_3d - the master switch. Off by default, and without a depth_map connected it does nothing.
  • stereo_layout - SBS or Top/Bottom, depending on what your viewer/headset expects.
  • depth_scale - strength of the 3D effect; higher shifts pixels further. Default 5, and the shift scales with image width.
  • invert_depth - flip this if your depth map uses white for far instead of near; get it wrong and the whole scene reads inside-out.
  • gap_fill - Inpaint (best quality) or None.

Optional inputs: depth_map (the IMAGE that makes 3D possible) and base_path (a save folder, e.g. the path output from Star Save Image+ if you want everything in one place). There's also subfolder and filename for path control.

Outputs

It returns two IMAGE sockets: image (what you saved) and 3d_image (the generated stereo view). Wire 3d_image into a preview node before committing - you want to eyeball the depth effect once before batch-saving dozens of files.

Installing and troubleshooting

Same pack install as everything else in StarNodes:

cd ComfyUI/custom_nodes
git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
pip install -r requirements.txt

ComfyUI Manager users can just search "Starnodes" and click Install.

The one gotcha people hit is ordering: if you're generating a depth map from a ControlNet/depth node, make sure it matches the panorama's dimensions. The node does resize the depth map to the image size if they differ, but a wildly mismatched or garbage depth input will produce a garbled stereo view no matter what. Check the 3d_image output before you trust it.

Category⭐StarNodes/Image And Latent

Inputs (11)

NameTypeDefaultDescription
imagesIMAGEThe images to save.
subfolderSTRINGOptional subfolder inside the base path.
filenameSTRINGpanorama
qualityINT951–100JPEG quality (1-100).
stereo_3dBOOLEANfalseAlso save a stereoscopic 3D image (requires depth_map input).
stereo_layoutCOMBOSBS2 options: SBS, Top/Bottom
depth_scaleFLOAT5.00.1–100Strength of the 3D effect. Higher values shift pixels further.
invert_depthBOOLEANfalseEnable if the depth map uses white for far instead of near.
gap_fillCOMBOInpaintFill gaps created by pixel shifting. Inpaint gives the best quality.
base_pathoptSTRINGBase save folder, e.g. the path output of Star Save Image+.
depth_mapoptIMAGEDepth map used to generate the stereoscopic image.

Outputs (2)

NameTypeDescription
imageIMAGE
3d_imageIMAGE