Nodes/MTB Nodes/Vae Decode (mtb)
ComfyUI Node Runs on cloud

Vae Decode (mtb)

The normal VAE decode, plus seamless textures and tiling

By melMass·Created 3 years ago·Updated about a month ago· 721
Vae Decode (mtb)
  • samples
  • vae
  • IMAGE
seamless_modelfalse
use_tiling_decodertrue
tile_size512

Ninety percent of the time you don't need this - the built-in VAE Decode is fine. Vae Decode (mtb) exists for the other ten percent: when you're making a seamless, tileable texture, or you want tiled decoding to keep VRAM under control on a big image. It's a drop-in replacement for core's decode with two extra switches bolted on.

If you're generating tiling textures - game assets, repeating patterns, backgrounds that need to loop - this is one of the pieces. MTB borrowed the "seamless hack" from FlyingFireCo's tiled_ksampler, and it works together with MTB's own Model Patch Seamless node.

How it works

A latent gets decoded to pixels by the VAE the same way core does it. The difference is the seamless option: when on, it applies a circular-padding trick during decode so the resulting image wraps at its edges - the left edge continues into the right, top into bottom - giving you a texture that tiles without a visible seam. Separately, the tiling decoder chops the decode into smaller tiles so you're never holding the whole image in VRAM at once, which is how you decode large outputs on a modest card.

The inputs and outputs that matter

  • samples (LATENT) and vae (VAE) - same as any decode.
  • seamless_model (default false) - the switch that makes the output tileable. This is the whole reason to use this node instead of core.
  • use_tiling_decoder (default true) - decode in tiles to save VRAM.
  • tile_size (default 512, range 320–4096, step 64) - the tile edge length. Bigger tiles = fewer seams but more VRAM; smaller = safer on memory but watch for tile artifacts.

Output is a single IMAGE.

How to install it

Via ComfyUI Manager: search MTB Nodes, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb

then restart. No model download - it uses the VAE you already load.

Common issues & troubleshooting

The texture still isn't seamless. Decoding alone can't fully make a texture tile - the sampling has to be seamless too. Turning on seamless_model here helps, but for a genuinely clean loop you also want to patch the model during sampling (MTB's Model Patch Seamless node). Do both, not just the decode.

Faint grid or seams in the image. That's the tiling decoder showing its tile boundaries. Increase tile_size if you've got the VRAM headroom, which reduces the number of tiles and the chance of visible seams.

It behaves exactly like the built-in. With seamless_model off, that's expected - it is the built-in decode plus tiling. If you're not doing seamless textures, you don't need this node; use core's VAE Decode (or its Tiled variant) and keep your graph simpler.

Categorymtb/decode

Inputs (5)

NameTypeDefaultDescription
samplesLATENT
vaeVAE
seamless_modelBOOLEANfalse
use_tiling_decoderBOOLEANtrue
tile_sizeINT512320–4096

Outputs (1)

NameTypeDescription
IMAGEIMAGE