Nodes/MAGICMATCH/MagicMatch Build LUT
ComfyUI Node

MagicMatch Build LUT

Build the expensive LUT once, tune it forever

By lookuters22·Created 3 months ago·Updated 3 months ago· 0
MagicMatch Build LUT
  • source
  • reference
  • lut

Most of the time in color matching you only need one expensive thing to happen: the analysis that turns your source + reference pair into a LUT. MagicMatch Build LUT is that half of the workflow, deliberately split out so you can run it once and then play with the strength slider until your eyes give up - without re-running the neural net every time.

The node takes two IMAGE inputs, source and reference, and returns a single custom MAGICMATCH_LUT output. That LUT is the merged 25³ 3D LUT plus the 1D LUT (and the base adjustments) produced by the ONNX color-match model. The build itself is where the pack's probe-parity pipeline earns its keep: the source is normalized like a worker bitmap (PNG → JPEG q98), auto-light/base adjustments are estimated from luminance, the source is rendered through the develop pass at 1600px and downscaled to 256 for the net, the reference gets its own WebP round-trip, and then color_match.onnx predicts the LUTs. On CPU that whole first run lands somewhere around 5–15 seconds - which is exactly why you don't want to redo it for every strength tweak.

Wire it like this:

[Source] ──► MagicMatch Build LUT ──► lut ──► MagicMatch Preview (strength) ──► Preview Image
[Reference] ─► MagicMatch Build LUT

You can also chain several Build nodes if you want to compare two references - the custom LUT type is just data flowing between nodes, so any LUT plugs into any Preview node. One nice touch: the build node hashes your source and reference, so re-queuing with the same pair doesn't rebuild; it only spends the seconds when the images actually change.

Install is the pack default: ComfyUI Manager → search "MAGICMATCH", or cd ComfyUI/custom_nodes && git clone https://github.com/lookuters22/MAGICMATCH.git, then pip install -r MAGICMATCH/requirements.txt and restart. The ONNX models (color match plus the face models used for white balance) come inside the clone, so there's nothing to fetch by hand.

Where people trip: the LUT only lives for the session - it's an in-memory object, not a file on disk. Change the source or reference and you must re-run Build to get a fresh LUT, or Preview will keep applying the stale one. And remember it's batch-size-1: feed a single image, not a stack. Pair this node with MagicMatch Preview rather than the one-shot while you're still dialing the look - that combination is the reason the pack splits them in the first place.

CategoryMAGICMATCH

Inputs (2)

NameTypeDefaultDescription
sourceIMAGE
referenceIMAGE

Outputs (1)

NameTypeDescription
lutMAGICMATCH_LUT