Save EXR
Where PNG quietly lies to you
- images
PNG is 8 bits per channel: 256 possible values for red, green, and blue. That's plenty for a photo you're going to post, and it's nowhere near enough for data masquerading as an image. A depth map, a displacement map, a normal pass, an HDR capture - these want floating-point values, and this node is how you get them out of ComfyUI. It writes 32-bit float EXR, RGB or RGBA, with version and frame numbering, overwrite protection, and (optionally) your workflow JSON saved alongside.
People in the community use it exactly that way: when a Depth-Anything release dropped, the comment section turned into "how do I get this out at more than 8 bits," and the answer was these EXR nodes. The data survives; PNG was quietly quantizing it.
How it works
On the way to disk it reverses the tonemap you'd see on screen: sRGB-encoded values get converted back to linear, and if you picked Reinhard it applies the inverse compression. So the stored file is scene-linear float data, not a display encoding. It flips RGB→BGR for OpenCV and, if you're saving an alpha channel, inverts it - that's an OpenCV EXR convention, and it's the one quirk to remember if your alpha ever looks backwards.
The output naming is the part you'll actually think about. With a relative filename_prefix it writes to ComfyUI's output folder using the standard counter scheme. With an absolute path it builds name_v###.NNNN.exr - version (default 1) gives you _v001, set it to -1 to drop the version entirely, and start_frame + frame_pad control the frame number, so start_frame 1001 with frame_pad 4 gives you .1001.exr. VFX pipelines start at 1001 for a reason; this node speaks that language.
It also refuses to overwrite: if the target file already exists, it stops and raises. Rerun a workflow and you'll hit it - bump the version and move on.
The inputs that matter
tonemap-linearstores raw values as-is;sRGB/Reinhardconvert from display encoding to linear first. For most exportssRGBis right, because ComfyUI hands you sRGB-encoded images.version/start_frame/frame_pad- the naming scheme above.save_workflow-ui,api,ui + api, ornone. Turns out EXR has no metadata slot for workflows (it's not PNG), so this writes_api.jsonand_ui.jsonfiles next to your image instead. Set it touiif you ever want to drag a generation back into the graph later.create_path_if_missing- only matters for absolute paths; lets it make the directory rather than erroring.
Install
Same pack as everything else: ComfyUI Manager → search ComfyUI-HQ-Image-Save → install → restart, or git clone https://github.com/spacepxl/ComfyUI-HQ-Image-Save into ComfyUI/custom_nodes/. Only imageio and opencv-python as dependencies, no models.
The author's own tip
For generation you intend to save as EXR, run ComfyUI with --fp32-vae. The VAE decode runs in fp16 by default, and if you're going to the trouble of storing full float precision, you don't want the last step before it dropping bits. The README says exactly this.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | ComfyUI | — |
| tonemap | COMBO | sRGB | 3 options: linear, sRGB, Reinhard |
| version | INT | 1-1–999 | — |
| start_frame | INT | 10010–99999999 | — |
| frame_pad | INT | 41–8 | — |
| save_workflow | COMBO | 4 options: ui, api, ui + api, none | |
| create_path_if_missing | BOOLEAN | false | — |
Outputs (0)
No outputs