LUT Bake Extract
The half of the LUT-baking workflow everyone forgets to explain
- batched_image
- bake_meta
- graded_photo
- graded_lattice
- lut_size
If you drop this node into a workflow cold, it makes no sense. It takes a weird two-image batch and a mysterious metadata blob, and outputs a photo, a lattice, and a number. It only makes sense in context - and the context is the coolest trick in the Darkroom pack: baking a whole grading chain into a .cube LUT in a single pass. LUT Bake Extract is the node that splits the batch back apart at the end of that chain.
The workflow it belongs to
The old way of building a LUT was miserable: run your whole grade twice - once on your photo, once on a neutral identity lattice - with every slider duplicated across two parallel chains. Change one setting in two places or the LUT drifts from your grade. The Darkroom bake workflow fixes that by pairing the photo and the lattice into a single 2-image batch so one chain grades both identically.
The wiring is:
Load Image ────► photo ─────┐
├─► LUT Bake Inject ─► [grading chain] ─► LUT Bake Extract
LUT Identity ─► lattice ────┤ ├─► graded_photo
└─► lut_size ────────────────────────────────────── └─► graded_lattice / lut_size
- LUT Bake Inject takes your photo, the identity lattice from LUT Identity Generator, and a
lut_size(17, 33, or 65), and emits a 2-image batch plusbake_meta. - The grading chain runs any color-only Darkroom nodes (Tone Curve, Lift Gamma Gain, HSL Selective, Film Stock, Log Wheels, Color Space Transform, LUT Apply, and friends).
- LUT Bake Extract splits the batch back into the graded photo and the graded lattice.
Its three outputs
graded_photo- your graded image, for preview and save. This is the same image you'd get if you ran the grade standalone.graded_lattice- the graded identity lattice, which feeds LUT Export'sprocessed_latticeinput. That node turns it into a standard .cube file for Resolve, Premiere, Photoshop, Capture One - anywhere 3D LUTs work.lut_size- the batch's lattice size, forwarded to LUT Export'slut_sizeinput.
So Extract is pure plumbing, but it's the plumbing that makes the single-chain workflow work: one set of settings, and both your preview and your LUT come out consistent by construction. No duplicated chains, no drift.
Inputs, and the one that trips people up
batched_image- the output of your grading chain, which must still be a 2-image batch (photo + padded lattice). If you run an image-count-changing node inside the chain, this breaks.bake_meta- connect from LUT Bake Inject'sbake_metaoutput. It carries the crop coordinates the Inject node used to pad the photo and lattice to a shared canvas, so Extract can undo the padding. Forget this connection and the node can't split correctly.
The pack's README is emphatic about the color-only rule: only nodes that transform each pixel independently can live inside the chain. Anything that looks at neighbors - Film Grain, Noise Reduction, Clarity/Texture/Dehaze, Lens Profile, Vignette, Sharpening Pro - corrupts the lattice and must go after Extract, applied to graded_photo. Follow that rule and the whole thing just works.
Installing it
It's part of the full ComfyUI-Darkroom pack:
cd ComfyUI/custom_nodes
git clone https://github.com/jeremieLouvaert/ComfyUI-Darkroom.git
pip install -r ComfyUI-Darkroom/requirements.txt
Or search "Darkroom" in ComfyUI Manager. Needs scipy, opensimplex, rawpy, exifread, Pillow. Restart and it's under AKURATE/Darkroom/Pipeline. The pack ships a ready-to-run workflows/lut_bake_and_apply.json example - drag it in, load a photo, and Queue Prompt, and you'll get both a graded preview and a .cube in output/luts/. That's the fastest way to see what this node actually does.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| batched_image | IMAGE | Output of the grading chain that started with LUT Bake Inject. Must still be a 2-image batch (photo + padded lattice). | |
| bake_meta | LUT_BAKE_META | Connect from LUT Bake Inject's bake_meta output. Carries the crop coordinates so we can split the batch back out. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| graded_photo | IMAGE | — |
| graded_lattice | IMAGE | — |
| lut_size | INT | — |