Nodes/Akatz Seamless Tiling/Akatz Circular VAE Decode
ComfyUI Node

Akatz Circular VAE Decode

Decode a tiling latent without a seam in the pixels

By akatz-ai·Created 3 months ago·Updated 2 months ago· 2
Akatz Circular VAE Decode
  • samples
  • vae
  • IMAGE
tiling

Sampled a seamless latent, decoded it, and the seam is still there. Annoying, right? The model was patched to generate tiling content, but the VAE that turns latents into pixels uses ordinary zero padding - so it reintroduces the very border artifact you just spent a workflow avoiding. Akatz Circular VAE Decode closes that gap. It's the decode-side half of the seamless tiling setup, and it's what makes the final image actually tile.

Think of the pipeline in two halves. Akatz Seamless Tile patches the diffusion model so the latent is seamless. This node patches the VAE so the pixels are seamless. Miss either half and you get a subtle bright or dark line at the tile border - sometimes barely visible until you tile the image, at which point it's all you can see.

How it works

The mechanism is identical in spirit to the model-side patch: this node clones your VAE, walks its first-stage model, and flips every Conv2d layer to circular padding before running the decode. Because the VAE's convolutions now read "the other side of the image" instead of "nothing" at the border, the decoded output wraps cleanly.

Two details worth knowing:

  • It always works on a copy. Unlike the other VAE node in this pack, AK_CircularVAEDecode never mutates the VAE you hand it - it clones internally and decodes with the clone. Your original VAE stays pristine for the rest of the graph. No surprises, no "my VAE is broken now."
  • The tiling menu gives you the same four modes - enable, x_only, y_only, disable - so you can match the decode to how the latent was generated. If you sampled with x_only (seamless left/right for a panorama) you want x_only here too. Mismatch them and you'll get a seam on the axis you thought you'd fixed.

Inputs and output

The three required inputs are what they look like:

  • samples - the LATENT from your sampler.
  • vae - the VAE you'd normally feed into a plain VAE Decode node.
  • tiling - which axes get circular padding.

The single output is IMAGE, and it's a drop-in replacement for the standard VAE Decode in your graph: wire it to a PreviewImage or SaveImage and you're done. Because it emits a normal image tensor, everything downstream - upscalers, detailers, the Impact Pack's whole toolkit - works exactly as it would after a regular decode.

Install

Same story as the rest of the pack - this is a package deal.

cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/Akatz-Seamless-Tiling

Then restart ComfyUI. Or use ComfyUI Manager and search "Akatz Seamless Tiling". No extra models, no API keys; the only Python deps are numpy and opencv-python-headless, which are already in virtually every ComfyUI environment.

Troubleshooting

  • Still see a seam on one axis - check that tiling matches what the sampler used. enable when you generated with x_only won't hurt, but y_only after an x_only sample definitely will.
  • Different colors than a normal decode - circular padding can slightly shift values at the borders on some VAEs. If the tile loops perfectly but the base image looks a hair off, that's the trade-off, and for texture work it's usually the right one.
  • The node is missing from an old workflow - this pack registers CircularVAEDecode (the spinagon-era name) as a compatibility alias, so legacy graphs should just load.
CategoryAkatz Seamless Tiling/Latent

Inputs (3)

NameTypeDefaultDescription
samplesLATENT
vaeVAE
tilingCOMBO4 options: enable, x_only, y_only, disable

Outputs (1)

NameTypeDescription
IMAGEIMAGE