LAB Blend & Save EXR / float-TIFF
LAB blend + EXR / float-TIFF in one node
- image_l
- image_ab
- preview
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, orACESCG. The choice is appended to the filename.file_format-EXR half(16-bit float, the default),EXR float(32-bit), orTIFF 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 imageiofixes it (FreeImage auto-downloads once); or just switchfile_formattoTIFF float32, which needspip install tifffileand 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.
previewis 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.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image_l | IMAGE | — | |
| image_ab | IMAGE | — | |
| chroma_blend | FLOAT | 1.000–1 | — |
| chroma_scale | FLOAT | 1.000–3 | — |
| primaries | COMBO | SRGB | 5 options: SRGB, DISPLAY_P3, REC2020, PROPHOTO, ACESCG |
| file_format | COMBO | EXR half | 3 options: EXR half, EXR float, TIFF float32 |
| filename_prefix | STRING | LABblend | — |
| backend | COMBO | auto | 3 options: auto, kornia, torch |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| preview | IMAGE | — |