ComfyUI Node

Preview 360 Video Panorama

Actually step inside your 360° video before you export it

By cedarconnor·Created about a year ago·Updated 7 months ago· 2
Preview 360 Video Panorama
  • video_frames
    fps30
    max_width2048

    A flat image preview of a 360° video is almost useless - you see a stretched strip that looks like a smeared planet and can't tell if the horizon is straight or if the back of the room warped into a smear. Preview 360 Video Panorama is an output-only node that renders your batch of equirectangular frames into an interactive Three.js viewer right in ComfyUI: drag to look around, scroll to zoom, and play or scrub through the timeline at a frame rate you choose. It's the difference between eyeballing a warped thumbnail and actually standing in the scene.

    The niche it serves is real but small: 360° work in ComfyUI is a corner of the ecosystem where people generate equirectangular content (there are even LoRAs trained for it) and then need to verify it wraps correctly before committing. This is that verification step for moving content - rotation sequences, animated panoramas, time-lapses, anything where a single still won't tell you the truth.

    How it works

    The node takes a batch of equirectangular frames (B, H, W, C), converts each to uint8, silently fixes grayscale frames by repeating them to RGB, optionally downsizes them, and encodes every frame to a base64 PNG. Those are shipped to a custom frontend widget (js/pano_viewer.js) that maps them onto a sphere with Three.js WebGL and handles the drag/zoom/playback. Important reality check: this is not a video codec. It's frame-by-frame base64 - which is exactly why max_width matters, because a 4K batch of base64 PNGs can get heavy fast.

    Inputs, and that's all there is:

    • video_frames - required. A batch of equirectangular frames, e.g. the output of a KSampler with batch_size set, or a video frames node.
    • fps - playback rate, 1–120, default 30. Set it to your animation's real cadence.
    • max_width - default 2048. Frames larger than this get resized; set to -1 for no resizing at all (do this only if you're sure about the performance hit).

    No outputs - it's a terminal preview node (OUTPUT_NODE), so it belongs at the end of your graph.

    How to install

    It ships in the LatLong pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cedarconnor/comfyui-LatLong.git
    cd comfyui-LatLong
    pip install -r requirements.txt
    

    Restart ComfyUI, or search "LatLong" in ComfyUI Manager. The pack's pip deps are light (numpy, opencv-python, scipy, torch, Pillow) and there are no model downloads. The one extra piece: the viewer pulls Three.js from a CDN. If you're offline or your setup blocks CDN imports and the viewer pane stays empty, run:

    python install.py
    

    from inside the pack folder - that downloads Three.js into js/lib/ so the widget works without network access.

    Common issues

    • Empty/blank viewer. Almost always the Three.js CDN import failing. Check your browser console, then run install.py as above.
    • Sluggish playback. You're pushing a pile of base64 PNGs through the frontend. Lower max_width (1024 is plenty for checking) or trim the batch.
    • Weird stretching. The frames need to be proper equirectangular 2:1 - if you feed it something else, the sphere projection looks wrong and that's a data problem, not a viewer bug.
    • It has no audio. Nobody should expect AAC in a ComfyUI preview node, but worth knowing before you promise yourself a concert film.

    For a preview-only node it's genuinely the fastest way to sanity-check that your animated panorama actually wraps, stays steady, and doesn't fall apart at the poles - before you spend a render cycle exporting it for real.

    CategoryLatLong

    Inputs (3)

    NameTypeDefaultDescription
    video_framesIMAGEBatch of equirectangular frames for 360° video playback.
    fpsINT301–120Frames per second for video playback
    max_widthINT2048-1–8192The max width to use. Frames larger than the specified value will be resized. Larger sizes may run slower. Set to -1 for no resizing.

    Outputs (0)

    No outputs