Save Image Higher Bit Depth
Save 16-bit and 32-bit images out of ComfyUI — and stop baking the banding in
- images
ComfyUI's stock SaveImage writes 8-bit PNGs, full stop. If you've ever pushed the exposure on a generated sky in Lightroom and watched it turn into a staircase of grey bands, you know exactly what that costs. This node is the fix: Save Image Higher Bit Depth saves your output as 8-bit, 16-bit, or even 32-bit float images, in PNG, TIFF, or JPEG, and it keeps your prompt and workflow embedded in the file while it's at it.
It's a tiny single-node pack, but it fills a real hole. 16-bit saves are the kind of thing people usually hack together with an imageio node - video workflows routinely save intermediate frames as 16-bit PNGs just to stop color drift across passes. This gives you that without bolting file-IO onto your graph.
How it works
The node takes whatever IMAGE tensor you feed it (after a VAE Decode, or straight from Load Image), converts it to a numpy array, and rescales:
- 8-bit → clipped to uint8, 0–255
- 16-bit → scaled to uint16, 0–65535
- 32-bit → float32, and only TIFF
That last one is worth knowing: pick 32 and the node silently ignores your format choice and writes a .tiff. 16-bit gives you a real 16-bit PNG if you ask for PNG, or a 16-bit TIFF if you ask for TIFF. JPEG is inherently 8-bit, so choosing it at 16 or 32 bits just gets quietly downgraded to a 16-bit PNG. Don't let the dropdown fool you.
Honest take on "higher bit depth": your VAE's output is fp32 in [0,1], so there genuinely is more precision than 8-bit captures. Saving 16-bit doesn't add detail the model didn't produce - but it stops you baking quantization banding in before you edit. If you grade or composite afterwards, that's the difference between smooth gradients and visible steps.
Nice touch: it embeds your prompt and workflow JSON in the output, in all three formats - the same "drag this image back in and the graph reconstructs" behavior ComfyUI culture depends on, which the stock JPEG/TIFF writers don't do. You can even embed an ICC profile for color-managed print work.
The inputs that matter
Only four required ones, and you'll mostly touch two:
images- the IMAGE tensor to savefilename_prefix- output name prefix, defaultComfyUIbit_depth-8/16/32format-PNG/TIFF/JPEG
The two optional fields - new_icc_profile (LAB/XYZ/sRGB) and existing_icc_profile_path - are for color nerds; leave them alone and it saves without a profile. Note you can't set both, it raises an error.
There are no outputs - this is an output node, so nothing to wire from it. Files land in your normal output folder.
Installing it
Ignore the README's advice to download save_image_node.py and drop it into custom_nodes - that's stale, and the file on its own won't register the node (you need the pack's __init__.py with the node mappings). Do it the normal way:
cd ComfyUI/custom_nodes
git clone https://github.com/aimerib/ComfyUI_HigherBitDepthSaveImage
pip install -r ComfyUI_HigherBitDepthSaveImage/requirements.txt
Then restart ComfyUI. Or just search "HigherBitDepth" in ComfyUI Manager, which handles the dependencies for you. No model downloads - unless you count the dependencies, see below.
Where people get burned
- Debug images everywhere. This is the big one: the node writes four extra PNGs (
debug_input_batch0.png,debug_normalized_batch0.png, etc.) into your output folder for every image it saves. Unconditional, straight from the source. Your output folder fills up fast - clean them out or move the real output elsewhere. - The dependency list lies a little.
requirements.txtpulls inopencv-python-headlessandimageio, but the code imports them and never calls them - onlytifffile,pypng, andpiexifare actually used. opencv's there just to satisfy an import, so you're installing ~50MB of dead weight. - It wants RGB. Feed it a non-3-channel image (some video VAEs decode to 12+ channels, a classic ComfyUI save-node trip-up) and it errors out on the
shape[2] != 3check. Run a normal VAE Decode into it. - No community to ask. This pack has essentially zero footprint on reddit or the wider ecosystem - it's one author's small utility. If something breaks, your options are the source or the issue tracker, not a stack of forum threads.
Bottom line: generate, save 16-bit, edit without banding, export. If you never push your images past the initial PNG, the stock node is fine. If your ComfyUI output is raw material, this is the save node you want.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to save. | |
| filename_prefix | STRING | ComfyUI | The prefix of the filename of the image you want to save. |
| bit_depth | COMBO | 8 | The bit depth of the image you want to save. |
| format | COMBO | PNG | The format of the image you want to save. |
| new_icc_profileopt | COMBO | Default | The ICC profile to embed in the saved image. 'LAB', 'XYZ', and 'sRGB' are color spaces. 'LAB' is a color space that is designed to be perceptually uniform, meaning that the color difference between two points in the color space is proportional to the actual color difference perceived by the human eye. 'XYZ' is a color space that is used in the CIE standard for colorimetry. 'sRGB' is a color space that is widely used in digital imaging and is supported by most web browsers and operating systems. |
| existing_icc_profile_pathopt | STRING | The custom ICC profile to embed in the saved image. The path to the ICC profile file. |
Outputs (0)
No outputs