Save Image (16 bit)
Stop saving banding — get all 16 bits out of ComfyUI
- images
A normal ComfyUI "Save Image" writes an 8-bit PNG: 256 levels per channel. For most generations that's plenty - nobody can see 256 steps of gray in a busy scene. But the moment your image is mostly one smooth gradient - a sky, a fog bank, a depth map you're taking into Blender - those 256 steps turn into visible stripes. Banding. This node is the fix: it writes a true 16-bit PNG with 65,536 levels per channel, so smooth regions stay smooth.
It ships in city96's ColorMod pack, from the same person behind ComfyUI-GGUF, so the quality bar is high even though this is a tiny node.
What it actually does
It's a subclass of the built-in SaveImage, so it behaves exactly like the node you already know - same output folder, same filename counter, same %date:yyyy-MM-dd%-style prefix tokens - except the file it writes is a 16-bit PNG via the pypng library instead of PIL's 8-bit path. The pixel values coming out of your graph are already float, so nothing here changes your colors; it just refuses to round them down to 8 bits on the way to disk.
The inputs that matter
images- whatever IMAGE you're saving.filename_prefix- defaultComfyUI. This is the one you'll touch: it accepts formatting tokens like%date:yyyy-MM-dd%or%Empty Latent Image.width%(per the tooltip), and anything with a slash becomes a subfolder underoutput/.
That's it. No outputs - it's an output node.
Installing
It's part of ComfyUI_ColorMod, so install the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/city96/ComfyUI_ColorMod
Restart ComfyUI, then install the requirements (this node needs pypng; without it the whole 16-bit family vanishes from your node list with a warning in the console):
cd ComfyUI/custom_nodes/ComfyUI_ColorMod
pip install -r requirements.txt
Standalone Windows install? Run this from the folder that holds your run_nvidia_gpu.bat:
.\python_embeded\python.exe -s -m pip install -r .\ComfyUI\custom_nodes\ComfyUI_ColorMod\requirements.txt
Easier still, ComfyUI Manager: search "ComfyUI_ColorMod" and let it handle the deps. There are no model downloads anywhere in this pack.
Where people get burned
- The 8-bit reader rounds it right back. If you load a saved 16-bit PNG with the stock Load Image, ComfyUI's PIL path reads it as 8-bit and your precision is gone. Read it back with this pack's Load Image (16 bit) node to keep the depth.
- The VAE will eat your precision anyway. The author's own testing (documented in the README) showed that encode→decode destroys 16-bit gradients: an fp32 VAE adds noise, fp16 is closer to the synthetic 16-bit source, and the bf16 VAE that's now the default on 20-series cards and up only keeps about 7 bits of mantissa. Save at 16 bits before you touch a VAE if precision is the goal.
- Bigger files, obviously. 16-bit PNGs are roughly double the size. That's the price of not banding.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to save. | |
| filename_prefix | STRING | ComfyUI | The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes. |
Outputs (0)
No outputs