spacepxl / ComfyUI-HQ-Image-Save

Load/save images and latents as 32bit EXRs
MIT License
36 stars 5 forks source link
comfyui

ComfyUI-HQ-Image-Save

Nodes:

Overview

Save and load images and latents as 32bit EXRs

Recommend adding the --fp32-vae CLI argument for more accurate decoding.

Scatterplot of raw red/green values, left=PNG, right=EXR. PNG quantizes the image to 256 possible values per channel (2^8), while the EXR has full floating point precision.

comparison

For latent EXR viewing purposes, if you want a cheap approximation of RGB values from the four latent channels, use this formula:

r = (0.298 * r + 0.187 * g - 0.187 * b - 0.184 * a) * 0.18215
g = (0.207 * r + 0.286 * g + 0.189 * b - 0.271 * a) * 0.18215
b = (0.208 * r + 0.173 * g + 0.264 * b - 0.473 * a) * 0.18215

Known Issues