Nodes/WAS Node Suite v3/LUT from Reference
ComfyUI Node Runs on cloud

LUT from Reference

Bottle a look, pour it on anything

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
LUT from Reference
  • source
  • reference
  • lut
methodmkl
color_spaceRGB
size33
strength1.00
title

LUT from Reference works out the color grade that turns one image into another and bakes it into a reusable 3D LUT. Give it an ungraded frame and a reference that has the look you want - the teal-and-orange film grade, the faded Kodak palette, the specific monitor calibration of a shot you're matching - and it computes the transform between them once, so you can apply that exact look to any image, batch, or video frame, forever, without the reference image being around.

It lives in WAS Node Suite (menu WAS Suite/Image/LUT), and it's the capture side of a pair: the suite's Image Color Match applies a computed grade to one batch on the fly, while this node lets you save it, blend it, and reuse it. In a color-matching workflow, it's the difference between "match these two specific images" and "own a look."

How it works

Two image inputs and a few choices about how the grade is measured:

  • source - the ungraded look, usually a frame straight out of your pipeline. Colors get mapped from here.
  • reference - the look to capture. A batch is pooled into one distribution, so several frames describe a target grade rather than one lucky shot. That's genuinely useful: average the grade across a dozen frames of a film and you capture the film, not a single scene's exposure.

Then three parameters shape the measurement:

  • method - mkl (default) matches full color covariance and suits most looks; reinhard matches mean and spread per channel and is gentler; histogram matches the whole distribution, is the strongest, and is the most likely to posterize. Start at mkl, escalate only if the match comes out weak.
  • color_space - RGB is direct; Lab separates lightness from color, which usually holds skin tones better. For people shots, Lab is the one to try.
  • size - the cube's edge length. 33 is the industry default and what most grading software writes; 65 is finer at eight times the data; 17 is coarser and can band on a smooth sky. Unless you have a reason, leave it at 33.

strength (0–1) is the knob most people underuse: 1.0 is the full match, 0.5 bakes the grade at half power, 0.0 writes an identity LUT. Dialing in a subtle look is often just strength 0.3–0.6 rather than re-measuring with a gentler method. The optional title string becomes the LUT's TITLE line when you save it, which is how your .cube files stay identifiable.

What comes out

One output: lut, the grade as a 3D lookup table. It wires into the suite's Apply LUT to color an image, LUT Blender to mix two looks, or Save LUT (.cube) to write a file any grading tool - Resolve, Photoshop, your editor of choice - can load. That last path is the fun one: match a look inside ComfyUI, export the .cube, and use it outside ComfyUI entirely.

Installing it

It's in WAS Node Suite v3. ComfyUI Manager → search "WAS Node Suite v3", or:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git

restart. Requires ComfyUI 0.14.0+ and Python 3.10+, no pip dependencies. The suite's LUT work runs on torch/ComfyUI's own device - nothing extra to install.

Where people get burned

The trap is overfitting to one frame. A single reference frame carries its own exposure and white balance, so the "grade" you capture is really "that shot's grade plus that shot's lighting." Feed a batch of reference frames so the distribution averages out. Second: if you push histogram on a low-bit-depth image, you'll see banding and posterization that had nothing to do with the source - drop back to mkl or reduce strength. And remember the LUT is measured in a color space: matching in RGB and applying to an image with a different working space won't look like it did on the node's preview.

CategoryWAS Suite/Image/LUT

Inputs (7)

NameTypeDefaultDescription
sourceIMAGEThe ungraded look, usually a frame straight out of your pipeline. The LUT maps colours from here to the reference.
referenceIMAGEThe look to capture. A batch is pooled into one distribution, so several frames describe a target grade rather than one shot.
methodCOMBOmklHow the grade is measured. `mkl` matches the full colour covariance and suits most looks. `reinhard` matches mean and spread per channel, which is gentler. `histogram` matches the whole distribution and is the strongest and the most likely to posterise.
color_spaceCOMBORGBWhere the match is measured. `RGB` is direct. `Lab` separates lightness from colour, which usually holds skin tones better.
sizeCOMBO33Edge length of the cube. 33 is the usual choice and what most grading software writes. 65 is finer and eight times the data; 17 is coarser and can band on a smooth sky.
strengthFLOAT1.000–1How much of the measured grade to bake in. 1.0 is the full match, 0.5 bakes it at half power, and 0.0 writes the identity LUT.
titleoptSTRINGName written into the LUT's TITLE line, which is what Save LUT (.cube) puts in the file. Empty names it after the method.

Outputs (1)

NameTypeDescription
lutLUTThe grade as a 3D lookup table, for Apply LUT, LUT Blender or Save LUT (.cube).