Nodes/ComfyUI-LABColorBlend/LAB Blend & Save EXR / float-TIFF
ComfyUI Node

LAB Blend & Save EXR / float-TIFF

LAB blend + EXR / float-TIFF in one node

By villainsquad·Created 2 months ago·Updated 2 months ago· 0
LAB Blend & Save EXR / float-TIFF
  • image_l
  • image_ab
  • preview
chroma_blend1.00
chroma_scale1.00
primariesSRGB
file_formatEXR half
filename_prefixLABblend
backendauto

This is the node that turns a ComfyUI image into something a VFX comp can actually eat. It does the exact same LAB blend as the pack's plain LABColorBlend (L channel from one image, a/b color from another) and then writes the result to an OpenEXR or float TIFF - linear, unclamped, in the primaries you pick. Nothing gets clipped, out-of-gamut colors survive as out-of-range floats, and the file lands on disk ready for Nuke or Resolve.

Why you'd bother: ComfyUI's default output path is an 8-bit-ish sRGB PNG in a 0–1 range. A color-managed pipeline lives in scene-linear float with a wide gamut - hand it a gamma-encoded PNG and every blend or merge in the comp comes out wrong. If your AI element has to sit next to real footage, you want a float file in a known color space, and this node does the whole thing in one shot: relight or re-color in LAB, write the comp-ready EXR. It's also the answer for HDR work where values legitimately go above 1.0. The through-line is the same as the rest of the post-processing layer - reach for the cheap deterministic primitive instead of re-rolling a generation.

The mechanism: both inputs convert to LAB, image_l supplies L, image_ab supplies a/b (interpolated by chroma_blend, scaled by chroma_scale), then the result goes LAB → linear RGB of your chosen primaries without clamping, written as float. EXR writing tries imageio/FreeImage first (it auto-downloads the small FreeImage binary once), falls back to OpenCV if its OpenEXR codec is enabled; TIFF float32 uses tifffile. It also returns a clamped sRGB preview so the UI and downstream nodes have something to show - browsers can't display EXR.

The inputs that matter beyond the shared blend ones:

  • primaries - the RGB container for the file. SRGB (which here means linear Rec.709, the safe default most EXR tools assume), DISPLAY_P3, REC2020, PROPHOTO, or ACESCG. The choice is appended to the filename.
  • file_format - EXR half (16-bit float, the default), EXR float (32-bit), or TIFF float32.
  • filename_prefix - where the file lands in ComfyUI's output directory.

Output is a single preview IMAGE; the real artifact is the file on disk.

Install is the same shared one-liner as the sibling node, and there are no model files:

cd ComfyUI/custom_nodes
git clone https://github.com/villainsquad/ComfyUI-LABColorBlend

Then restart. kornia (the default blend backend) is already in ComfyUI's requirements, so the blend itself needs nothing extra - the only bits that might need a pip install are the optional writers.

Where people get burned:

  • EXR save errors. If you don't have imageio, the write fails with guidance in the console. pip install imageio fixes it (FreeImage auto-downloads once); or just switch file_format to TIFF float32, which needs pip install tifffile and always works. The node prints which backend actually wrote the file - check the console if something's off.
  • No ICC or chromaticities tag on the file. The primaries are only recorded in the filename. Don't let your editor guess the color space - set it yourself in the comp, or the "wide" result will look flat and wrong.
  • Chaining from the preview loses the point. preview is clamped sRGB. If you need the wide-gamut or >1.0 data, chain from the file, not from the node's output.
  • EXR half vs float. Half is 16-bit float and fine for almost every comp, but if you see banding on big smooth gradients, step up to EXR float. And remember: 16-bit integer PNG can hold a wide gamut but never values beyond 0–1 - for the unclamped case you need float, which is exactly why this node exists.
Categoryimage/color

Inputs (8)

NameTypeDefaultDescription
image_lIMAGE
image_abIMAGE
chroma_blendFLOAT1.000–1
chroma_scaleFLOAT1.000–3
primariesCOMBOSRGB5 options: SRGB, DISPLAY_P3, REC2020, PROPHOTO, ACESCG
file_formatCOMBOEXR half3 options: EXR half, EXR float, TIFF float32
filename_prefixSTRINGLABblend
backendCOMBOauto3 options: auto, kornia, torch

Outputs (1)

NameTypeDescription
previewIMAGE