360° VAE Decode
Decode the latent without re-importing the seam
- samples
- vae
- IMAGE
After a good sampler pass your latent is about as seamless as latent space gets. But VAE decode is its own opportunity to wreck the wrap: the decoder's convolutions look at a flat rectangle and have no idea the left edge is supposed to meet the right edge. Equirect360VAEDecode is a VAEDecode replacement that gives the decoder that context by circular-padding the latent before decode and cropping the padding back off after.
Three inputs, two of which you'll actually set:
samples- the latent from 360° KSampler (or a standard KSampler).vae- the VAE matching your model, from a VAELoader.circular_padding(default 16, 0–128) - how much X circular padding to apply in latent space. 0 is a fine baseline; go 8–16 if you see a seam after decode; and set it to 0 if you're using Apply Circular Padding VAE.
The mechanism is clean: it pads the latent with a wrapped copy on the left/right, decodes the padded latent, then crops the padding off. Because the FLUX VAE is 8× compression, 16 latent pixels become 128 image pixels - so the padding values look small but the effect is generous. Output is a regular IMAGE, ready for 360° Edge Blender or a Save Image node.
The one footgun to remember: double padding. If you've patched the VAE with Apply Circular Padding VAE (which makes the decoder's own convolutions circular), you should not also pad here - set circular_padding to 0, or you get mushy, doubled edges. The tooltip says exactly this, the README repeats it, and it's the most common mistake with the two VAE-side nodes in this pack.
Install
Same as the whole pack - 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. No heavy dependencies - numpy and Pillow, both already in ComfyUI. Models: FLUX.1-dev in models/checkpoints, DiT360 LoRA (~2–5GB, Insta360-Research on Hugging Face) in models/loras at strength 1.0.
Troubleshooting
- Edges look soft or doubled after decode → you're double-padding. Check whether Apply Circular Padding VAE is in the graph and zero this node's
circular_padding. - Seam still visible after decode → raise
circular_paddingto 8–16, then lean on the Edge Blender for the rest. - Everything looks fine → leave it at 0 and let the Edge Blender handle the seam. Less work, same result.
Honest take: this is insurance, not the main event. The sampler's circular padding does the heavy lifting, decode padding catches what leaks through, and the Edge Blender sweeps the rest. On a 16GB card at 2048×1024 it's cheap enough to leave on - just never at the same time as the VAE patch.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | Latent samples to decode (from 360° KSampler). | |
| vae | VAE | VAE used to decode latents into images (must match your model). | |
| circular_padding | INT | 160–128 | Latent-space padding applied during VAE decode. Recommended: 0 (baseline) or 8-16 if you see a seam after decode. Set to 0 when using Apply Circular Padding VAE. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |