Nodes/tiled_ksampler/Circular VAEDecode
ComfyUI Node

Circular VAEDecode

The decoder that keeps your tile seamless (pair it with the tiled samplers)

By FlyingFireCo·Created 3 years ago·Updated 2 years ago· 103
Circular VAEDecode
  • samples
  • vae
  • IMAGE

The Tiled KSampler and its asymmetric cousin wrap your image edges during sampling so they match up seamlessly. Then you hit decode and the seam is back. This node is the missing half of that story: it's a drop-in replacement for the standard VAEDecode that decodes with circular padding, so the wrap survives all the way to pixels. The pack's README doesn't mince words about it - "you'll need to use this when decoding the image, otherwise you'll get bleeding around the edges."

Why the plain decoder ruins the tile

Diffusion and decoding are two separate stacks of convolutions. The tiled samplers from this pack patch the UNet so it wraps edges during the sampling pass, but the VAE decoder is its own model with its own layers, and it pads normally - looking past the border into nothing. So a latently seamless image gets decoded with mismatched edges and the seam shows up right at the boundary, exactly where you were trying to make it invisible. This node makes the decoder play along.

How it works

No clever graph tricks. It finds every convolution layer inside the VAE's decoder (first_stage_model), sets its padding mode to circular, and calls the ordinary decode. Circular padding wraps out-of-bounds values to the opposite edge, so the decode, like the sample, treats the image as a continuous loop. Left meets right, top meets bottom, seam gone.

The inputs that matter

It's about as minimal as a node gets:

  • samples (LATENT) - the output of your Tiled KSampler / Asymmetric Tiled KSampler
  • vae (VAE) - the same VAE your workflow already uses

One output, IMAGE, which feeds anything that expects pixels: Save Image, Preview, an image editor node, a second-pass img2img. In a tiled workflow the chain is simply sampler → Circular VAEDecode → Save.

Installing it

Same story as the rest of the pack - there is no dependency story. No requirements.txt, no pip step, no model files; it runs against ComfyUI's own modules. Via ComfyUI Manager:

  1. Manager → Install Custom Nodes → search tiled_ksampler → Install → restart ComfyUI

Or clone it:

cd ComfyUI/custom_nodes
git clone https://github.com/FlyingFireCo/tiled_ksampler.git

Then restart. It shows up under the latent category, alongside the stock VAEDecode.

One caveat worth knowing

The node sets circular padding on the VAE and never resets it. For a tiled output that's exactly what you want, but it means the loaded VAE stays circular for the rest of the session - if you later run a plain VAEDecode on the same VAE in the same run, that decode will also be wrapped, whether you asked for it or not. It won't break anything, but if you want a genuinely default decode, reload the workflow so the VAE gets fresh padding. It's a small, honest utility: use it whenever you've sampled with a tiled sampler, and skip it otherwise.

Categorylatent

Inputs (2)

NameTypeDefaultDescription
samplesLATENT
vaeVAE

Outputs (1)

NameTypeDescription
IMAGEIMAGE