Nodes/ComfyUI_SZtools/山竹VAE平滑解码器
ComfyUI Node

山竹VAE平滑解码器

The 16-bit TIFF decoder — and the reason it writes files next to your ComfyUI

By Rocky-Lee-001·Created about a year ago·Updated about a year ago· 2
山竹VAE平滑解码器
  • samples
  • vae
  • IMAGE

ShanzhuVAEDecodeSmooth is the pack's attempt at fixing banding the honest way: instead of just adding noise to pixels, it decodes your latent and writes the result as a 16-bit TIFF, where gradient steps are fine enough that banding mostly stops being a problem. The code's own DESCRIPTION says it plainly - "Decodes latent images back into pixel space images in 16-bit TIFF format to reduce banding artifacts."

The mechanism: samples (LATENT) and vae in, vae.decode out. The decoded float tensor (values 0–1) is scaled by 65535, cast to unsigned 16-bit, transposed to HWC layout, and each frame is written via tifffile as decoded_image_{i}.tif. The IMAGE output still carries the regular float tensor, so your graph keeps flowing as if nothing unusual happened - the TIFF is a side effect, not the wire. You get one TIFF per batch frame, numbered from zero.

And here's the gotcha that will bite you: those filenames are relative. tifffile.imwrite("decoded_image_0.tif", ...) writes to the process's current working directory - which on most installs is wherever you launched ComfyUI from, not the output folder and not the temp folder. First time you run this, go check that directory; the files will be sitting right next to your launch script. That's by far the most confusing thing about this node, and it's worth knowing before you go hunting through ComfyUI/output for your TIFFs.

Is 16-bit worth it? For real post-processing, yes: a 16-bit TIFF preserves smooth gradients (skies, walls, soft shadows) that an 8-bit PNG will visibly band once you push levels in an editor. That's the classic banding fix, and it's the honest use of this node - feed the result into Photoshop, DaVinci, or any pipeline that actually consumes 16-bit data. For anything destined to live as a JPEG on socials, it's pointless; you'll crush it back to 8-bit anyway.

There's no custom_path and no filename control here - you get decoded_image_0.tif onward, no matter what. If you want path control or grayscale output, the pack's ShanzhuLujingTIFSaver handles that; this node is specifically the decode-and-dump-to-16-bit step.

Install is the shared pack story: ComfyUI Manager search "ComfyUI_SZtools", or git clone https://github.com/Rocky-Lee-001/ComfyUI_SZtools into custom_nodes/, then restart. tifffile is one of the few dependencies this pack actually adds, and this node is the reason it's in requirements.txt.

Category山竹VAE平滑解码器

Inputs (2)

NameTypeDefaultDescription
samplesLATENTThe latent to be decoded.
vaeVAEThe VAE model used for decoding the latent.

Outputs (1)

NameTypeDescription
IMAGEIMAGEThe decoded image in 16-bit TIFF format.