Nodes/ComfyUI-DiT360/360° Empty Latent
ComfyUI Node

360° Empty Latent

1, so your panorama isn't squished or cropped

By cedarconnor·Created 10 months ago·Updated 9 months ago· 3
360° Empty Latent
    • LATENT
    width2048
    batch_size1

    Equirectangular panoramas have one hard rule: width must be exactly twice the height. Break it and your "360° image" either looks stretched, gets cropped when it's mapped onto a sphere, or both - because the image has to cover 360° of yaw and 180° of pitch, and only a 2:1 rectangle maps onto that sphere cleanly. Equirect360EmptyLatent exists so you can't get it wrong: it's EmptyLatentImage with the 2:1 ratio and FLUX's 16-pixel alignment enforced for you.

    You give it one number and it handles the rest. Inputs:

    • width (default 2048) - output width in pixels. Height is auto-set to width/2. The pack's VRAM guide: 1024 (12GB cards), 2048 (16GB+), 4096 (24GB+). Must be a multiple of 16; the node snaps it if you don't.
    • batch_size (default 1) - images per run. Panorama latents are VRAM-hungry, so leave this at 1 unless you know why you need more.

    Output is a LATENT ready for the 360° KSampler (or a normal KSampler). Mechanically it's simple: it derives the 2:1 dimensions, then builds a zero latent with the 16 channels and 8× downscaled size that FLUX's VAE expects - and it prints the final image dimensions to the console so you always know what you're working with.

    Use it in place of EmptyLatentImage at the start of any 360° workflow. The classic chain is: Load FLUX.1-dev + DiT360 LoRA (standard nodes - this pack is explicitly not a model loader) → 360° Empty Latent → 360° KSampler → 360° VAE Decode → 360° Edge Blender → save.

    Install

    ComfyUI Manager (search "ComfyUI-DiT360"), or:

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

    then restart. requirements.txt is tiny - numpy and Pillow, both already in ComfyUI - so the install side is trivial. The real setup cost is models: FLUX.1-dev into models/checkpoints, and the DiT360 LoRA (~2–5GB) from Insta360-Research on Hugging Face into models/loras, applied with a standard LoRA loader at strength 1.0.

    Troubleshooting

    • Out of memory → drop width to 1024 (and check you're on batch_size 1). 4096×2048 genuinely wants a 24GB card.
    • Height looks wrong → it isn't. Width/2 is correct for equirectangular, even though it feels squat next to the 16:9 you're used to. That's the point.
    • Non-multiple-of-16 errors → the node snaps to alignment, so you shouldn't see these - if you do, update the pack (v2.0+ fixed the geometry bugs).

    Honest take: it's a helper node, not a magic one - its entire job is removing a footgun. That's exactly why you should use it. The wrong-aspect mistake is one of the most common beginner failures in 360° work, and this eliminates it by construction. There's no real downside to swapping it in.

    CategoryDiT360/latent

    Inputs (2)

    NameTypeDefaultDescription
    widthINT2048512–8192Output width in pixels (height auto = width/2 for 2:1). Recommended: 1024 (12GB), 2048 (16GB+), 4096 (24GB+). Must be multiple of 16.
    batch_sizeINT11–4096Images per run. Recommended: 1 (VRAM heavy). Increase only if you have enough VRAM for multiple panoramas at once.

    Outputs (1)

    NameTypeDescription
    LATENTLATENT